diff --git a/tests/complete.c b/tests/complete.c index 7b1cbe3..f19df4c 100644 --- a/tests/complete.c +++ b/tests/complete.c @@ -82,7 +82,7 @@ static void pipe_read_cb(uev_t *w, void UNUSED(*arg), int events) return; } - /* Kick watchdog */ + /* Kick watchdog */ if (watchdog) uev_timer_set(watchdog, 1000, 0); @@ -112,9 +112,9 @@ static void pipe_write_cb(uev_t *w, void *arg, int UNUSED(events)) /* Here we *must* use out, not w->fd, since we're a timer callback */ if (write(out, msg, my->counter) < 0) { - perror("\nFailed writing to pipe"); - return; - } + perror("\nFailed writing to pipe"); + return; + } // fprintf(stderr, "WRITE %.*s %d\n", my->counter, msg, my->counter); fprintf(stderr, "%d ", my->counter); diff --git a/tests/cronrun.c b/tests/cronrun.c index 855efd3..c8a740a 100644 --- a/tests/cronrun.c +++ b/tests/cronrun.c @@ -66,7 +66,7 @@ int main(void) printf("Start of test %s", ctime(&tv.tv_sec)); printf("Expected cron %s", ctime(&when)); - + interval = INTERVAL; uev_cron_init(&ctx, &cron_watcher, cron_job, NULL, when, interval); diff --git a/tests/signal.c b/tests/signal.c index dbe29d7..c41924c 100644 --- a/tests/signal.c +++ b/tests/signal.c @@ -63,7 +63,7 @@ static int callback(arg_t *arg, int event, void *foo) printf("child: segfaulting failed!\n"); #endif - return 42; + return 42; } static void sigsegv_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) @@ -74,27 +74,27 @@ static void sigsegv_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) static void sigchld_cb(uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events)) { - pid_t pid = waitpid(-1, NULL, WNOHANG); + pid_t pid = waitpid(-1, NULL, WNOHANG); - if (-1 != pid) - warnx("PID %d exited, bye.", pid); + if (-1 != pid) + warnx("PID %d exited, bye.", pid); } static void work_cb(uev_t *UNUSED(w), void *arg, int UNUSED(events)) { int status = 0; - pid_t pid; + pid_t pid; - pid = fork(); - if (-1 == pid) - err(1, "fork"); + pid = fork(); + if (-1 == pid) + err(1, "fork"); if (!pid) { status = callback(arg, 6137, NULL); - exit(status); - } + exit(status); + } - if (waitpid(pid, &status, 0) == -1) - err(1, "waitpid"); + if (waitpid(pid, &status, 0) == -1) + err(1, "waitpid"); if (WIFEXITED(status)) printf("Child exited normally => %d\n", WEXITSTATUS(status)); @@ -108,7 +108,7 @@ static void work_cb(uev_t *UNUSED(w), void *arg, int UNUSED(events)) static void exit_cb(uev_t *w, void *UNUSED(arg), int UNUSED(events)) { - printf("Process deadline reached, exiting!\n"); + printf("Process deadline reached, exiting!\n"); uev_exit(w->ctx); }