From 729675601aaa056a972ec0cb83e4631574b9258c Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sat, 4 Jan 2020 18:20:58 +0100 Subject: [PATCH] reproc: Stop returning from test functions. --- reproc/test/argv.c | 2 -- reproc/test/environment.c | 2 -- reproc/test/io.c | 10 ++-------- reproc/test/overflow.c | 2 -- reproc/test/stop.c | 6 +----- reproc/test/working-directory.c | 2 -- 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/reproc/test/argv.c b/reproc/test/argv.c index c888bae00..a387b9e4b 100644 --- a/reproc/test/argv.c +++ b/reproc/test/argv.c @@ -42,6 +42,4 @@ int main(void) reproc_destroy(process); reproc_free(output); - - return 0; } diff --git a/reproc/test/environment.c b/reproc/test/environment.c index 12cdf10ed..82e9b00e5 100644 --- a/reproc/test/environment.c +++ b/reproc/test/environment.c @@ -42,6 +42,4 @@ int main(void) reproc_destroy(process); reproc_free(output); - - return 0; } diff --git a/reproc/test/io.c b/reproc/test/io.c index 71845a6d1..947ed3ed4 100644 --- a/reproc/test/io.c +++ b/reproc/test/io.c @@ -5,7 +5,7 @@ #include #include -static int io(const char *mode, const char *input, const char *expected) +static void io(const char *mode, const char *input, const char *expected) { int r = -1; @@ -36,11 +36,9 @@ static int io(const char *mode, const char *input, const char *expected) reproc_destroy(process); reproc_free(output); - - return 0; } -static int timeout(void) +static void timeout(void) { int r = -1; @@ -63,8 +61,6 @@ static int timeout(void) assert(r == REPROC_EPIPE); reproc_destroy(process); - - return 0; } #define MESSAGE "reproc stands for REdirected PROCess" @@ -76,6 +72,4 @@ int main(void) io("both", MESSAGE, MESSAGE MESSAGE); timeout(); - - return 0; } diff --git a/reproc/test/overflow.c b/reproc/test/overflow.c index f24bacb01..c9b1af89a 100644 --- a/reproc/test/overflow.c +++ b/reproc/test/overflow.c @@ -27,6 +27,4 @@ int main(void) reproc_destroy(process); reproc_free(output); - - return 0; } diff --git a/reproc/test/stop.c b/reproc/test/stop.c index 2d9235a60..5b9c0f5a8 100644 --- a/reproc/test/stop.c +++ b/reproc/test/stop.c @@ -3,7 +3,7 @@ #undef NDEBUG #include -static int stop(REPROC_STOP action, int status) +static void stop(REPROC_STOP action, int status) { int r = -1; @@ -22,14 +22,10 @@ static int stop(REPROC_STOP action, int status) assert(r == status); reproc_destroy(process); - - return 0; } int main(void) { stop(REPROC_STOP_TERMINATE, REPROC_SIGTERM); stop(REPROC_STOP_KILL, REPROC_SIGKILL); - - return 0; } diff --git a/reproc/test/working-directory.c b/reproc/test/working-directory.c index f5aaf11f7..1c88d2cce 100644 --- a/reproc/test/working-directory.c +++ b/reproc/test/working-directory.c @@ -38,6 +38,4 @@ int main(void) reproc_destroy(process); reproc_free(output); - - return 0; }