Coding Syle Cleanups. Signed-Off-By: <michal.simek@petalogix.com>.
diff --git a/testcases/kernel/syscalls/fdatasync/fdatasync01.c b/testcases/kernel/syscalls/fdatasync/fdatasync01.c
index bd8d208..f6e9c98 100644
--- a/testcases/kernel/syscalls/fdatasync/fdatasync01.c
+++ b/testcases/kernel/syscalls/fdatasync/fdatasync01.c
@@ -82,15 +82,14 @@
char *TCID = "fdatasync01"; /* 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; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *)NULL, NULL)) !=
- (char *)NULL) {
+ if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) !=
+ (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
@@ -109,7 +108,7 @@
/* check return code */
if (TEST_RETURN == -1) {
tst_resm(TFAIL, "fdatasync() failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
+ TEST_ERRNO, strerror(TEST_ERRNO));
} else {
/* No Functional verification yet */
tst_resm(TPASS, "fdatasync() successful");
@@ -119,14 +118,12 @@
/* perform global cleanup and exit */
cleanup();
- /*NOTREACHED*/
- return 0;
+ /*NOTREACHED*/ return 0;
-} /* End main */
+} /* End main */
/* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -140,18 +137,15 @@
tst_tmpdir();
/* Initialize unique filename for each child process */
- if( sprintf(filename, "fdatasync_%d", getpid()) <= 0) {
+ if (sprintf(filename, "fdatasync_%d", getpid()) <= 0) {
tst_brkm(TBROK, cleanup, "Failed to initialize filename");
- /*NOTREACHED*/
- }
- if((fd = open(filename, O_CREAT|O_WRONLY, 0777)) == -1) { //mode must be specified when O_CREATE is in the flag
+ /*NOTREACHED*/}
+ 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");
- /*NOTREACHED*/
- }
- if((write(fd, filename, strlen(filename) + 1)) == -1) {
+ /*NOTREACHED*/}
+ if ((write(fd, filename, strlen(filename) + 1)) == -1) {
tst_brkm(TBROK, cleanup, "write() failed");
- /*NOTREACHED*/
- }
+ /*NOTREACHED*/}
}
/*
@@ -159,14 +153,13 @@
* 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.
* print errno log if that option was specified.
*/
- close(fd);
+ close(fd);
TEST_CLEANUP;
@@ -175,6 +168,4 @@
/* exit with return code appropriate for results */
tst_exit();
- /*NOTREACHED*/
-}
-
+ /*NOTREACHED*/}