diff --git a/tests/args.c b/tests/args.c index 9f59c9012dc2e6fbbb89afc3e401d70ade82ee4d..49e7ae0ff4d127792f3ddfe7903480cea5eb4dcf 100644 --- a/tests/args.c +++ b/tests/args.c @@ -1,4 +1,3 @@ -#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -9,5 +8,4 @@ int main(int argc, char *argv[]) { write(STDOUT_FILENO, " ", 1); } write(STDOUT_FILENO, "\n", 1); - return EXIT_SUCCESS; } diff --git a/tests/ctype.c b/tests/ctype.c index 40ba65ae47983460428bddee25f909238bd5d590..1dd70680f246f7339232185f8e98f41e3741ebeb 100644 --- a/tests/ctype.c +++ b/tests/ctype.c @@ -1,5 +1,6 @@ #include <ctype.h> #include <stdio.h> +#include <stdlib.h> struct test_case { int c; @@ -289,12 +290,12 @@ size_t num_test_cases = sizeof(test_cases) / sizeof(struct test_case); #define CHECK_TEST(tc, fn, retval) \ if (fn(tc.c) != tc.fn) { \ - retval = -1; \ + retval = EXIT_FAILURE; \ printf("Unexpected result: " #fn "('%c') != %d // Char value: %d\n", tc.c, tc.fn, tc.c); \ } int main(void) { - int retval = 0; + int retval = EXIT_SUCCESS; for(int i = 0; i < num_test_cases; ++i) { struct test_case tc = test_cases[i]; @@ -316,7 +317,7 @@ int main(void) { CHECK_TEST(tc, toupper, retval); } - if (!retval) { + if (retval == EXIT_SUCCESS) { printf("Success: %d\n", retval); } else { printf("Failure: %d\n", retval); diff --git a/tests/dirent/main.c b/tests/dirent/main.c index aa574ba7d3e319821fbd9ba2f248580557f4adb6..92a4fe24674b32ab5dffbd56a393ef4ab5a0ac28 100644 --- a/tests/dirent/main.c +++ b/tests/dirent/main.c @@ -38,6 +38,4 @@ int main(void) { // puts(entry->d_name); closedir(dir); - - return EXIT_SUCCESS; } diff --git a/tests/error.c b/tests/error.c index 3bfd5217ff4115ce72f02d334d4d73150d141d6d..09756286f8a30fc84b2524a103c225f9e3adba12 100644 --- a/tests/error.c +++ b/tests/error.c @@ -1,6 +1,5 @@ #include <unistd.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> #include <errno.h> @@ -8,5 +7,4 @@ int main(void) { chdir("nonexistent"); printf("errno: %d = %s\n", errno, strerror(errno)); perror("perror"); - return EXIT_SUCCESS; } diff --git a/tests/fcntl/fcntl.c b/tests/fcntl/fcntl.c index d6f85a9a46aa196ee9a5f34ad83f0a428d2bccfe..3ec16a84d145c3952983b4bf236dbf5a1c58c1e1 100644 --- a/tests/fcntl/fcntl.c +++ b/tests/fcntl/fcntl.c @@ -1,6 +1,5 @@ #include <fcntl.h> #include <stdio.h> -#include <stdlib.h> #include <unistd.h> int main(void) { @@ -11,5 +10,4 @@ int main(void) { printf("fd %d duped into fd %d\n", newfd, newfd2); close(newfd); close(newfd2); - return EXIT_SUCCESS; } diff --git a/tests/libgen.c b/tests/libgen.c index 4feee89bf02c899410107a7358d811634274b6bd..91b18a4f3cbc5a6f1fdc428bb67dd3873a34e20e 100644 --- a/tests/libgen.c +++ b/tests/libgen.c @@ -77,5 +77,4 @@ int main(void) { printf("Testing libgen.h\n"); test_basename(); test_dirname(); - return EXIT_SUCCESS; } diff --git a/tests/math.c b/tests/math.c index b06109775567d638a2892bafc5174f817ecf21d4..9f485b1b0e3fd66108853c0d9e15b25d73c1c955 100644 --- a/tests/math.c +++ b/tests/math.c @@ -1,10 +1,8 @@ #include <math.h> #include <stdio.h> -#include <stdlib.h> int main(void) { double pi = 3.14; float c = cos(pi); printf("cos(%f) = %f\n", pi, c); - return EXIT_SUCCESS; } diff --git a/tests/netdb/getaddrinfo.c b/tests/netdb/getaddrinfo.c index efe4c5dfece7e69dce9836fbf35ee4e5bb04388e..1c92a8630797efc0b5a88248418bb6be3d02aaa7 100644 --- a/tests/netdb/getaddrinfo.c +++ b/tests/netdb/getaddrinfo.c @@ -45,6 +45,4 @@ int main(void) { res = res->ai_next; } - - return EXIT_SUCCESS; } diff --git a/tests/stdio/all.c b/tests/stdio/all.c index 33a5f905b12e137afaf34502bd9293b4ad657b29..d1e393e3074628320e9b5103f306e5c793f8c5ed 100644 --- a/tests/stdio/all.c +++ b/tests/stdio/all.c @@ -9,5 +9,4 @@ int main(void) { printf("%s\n", fgets(in, 30, f)); setvbuf(stdout, 0, _IONBF, 0); printf("Hello\n"); - return EXIT_SUCCESS; } diff --git a/tests/stdio/fputs.c b/tests/stdio/fputs.c index 74424b20ee862d5f718abc3466f32b0527cad733..52aef7da681681329bec90fd909543cbaba54fc4 100644 --- a/tests/stdio/fputs.c +++ b/tests/stdio/fputs.c @@ -1,5 +1,4 @@ #include <stdio.h> -#include <stdlib.h> #include <errno.h> int main(void) { @@ -7,5 +6,4 @@ int main(void) { char *in = "Hello World!"; fputs(in, f); // calls fwrite, helpers::fwritex, internal::to_write and internal::stdio_write fclose(f); - return EXIT_SUCCESS; } diff --git a/tests/stdio/fread.c b/tests/stdio/fread.c index 6e95bc729180aad07c5a3b98271e60284da3499d..e5e13b28cbf0d62abb6eb432417cec5e11e0cbaa 100644 --- a/tests/stdio/fread.c +++ b/tests/stdio/fread.c @@ -17,6 +17,4 @@ int main(void) { } fclose(fp); - - return EXIT_SUCCESS; } diff --git a/tests/stdio/freopen.c b/tests/stdio/freopen.c index b68a858383ae3749bbc7144d71033594fb69d854..e7ec2c271d3d19a745c02aec2c9eceb78a740806 100644 --- a/tests/stdio/freopen.c +++ b/tests/stdio/freopen.c @@ -1,10 +1,8 @@ #include <stdio.h> -#include <stdlib.h> int main(void) { freopen("stdio/stdio.in", "r", stdin); char in[6]; fgets(in, 6, stdin); printf("%s\n", in); // should print Hello - return EXIT_SUCCESS; } diff --git a/tests/stdio/fwrite.c b/tests/stdio/fwrite.c index 93f412413ca414dc3b2410b978cea3c51eb0f0e7..9132420bffc3c88f2f102ac29ddf2359c69187aa 100644 --- a/tests/stdio/fwrite.c +++ b/tests/stdio/fwrite.c @@ -20,5 +20,4 @@ int main(void) { fwrite(ptr, sizeof(ptr), 1, f); fclose(f); - return EXIT_SUCCESS; } diff --git a/tests/stdio/popen.c b/tests/stdio/popen.c index 89f1d9a097d55348de1ead7ec42ea6bfe89ab852..afa83fab0a85e382f403cdb593c9a39ee6d40c69 100644 --- a/tests/stdio/popen.c +++ b/tests/stdio/popen.c @@ -25,6 +25,4 @@ int main(void) { } else { printf("status %x\n", status); } - - return EXIT_SUCCESS; } diff --git a/tests/stdio/printf.c b/tests/stdio/printf.c index ebe84e79d0d21367098199a75b3a6653520ed1c3..ea7b8dde0233060ee0f975fef646cb1675f48e21 100644 --- a/tests/stdio/printf.c +++ b/tests/stdio/printf.c @@ -1,5 +1,4 @@ #include <stdio.h> -#include <stdlib.h> int main(void) { int sofar = 0; @@ -49,5 +48,4 @@ int main(void) { printf("%G\n", 0.0001); printf("%G\n", 0.00001); printf("%E\n", 0.00001); - return EXIT_SUCCESS; } diff --git a/tests/stdio/setvbuf.c b/tests/stdio/setvbuf.c index 8d38913cf2c309179fda3acfdf80734ad95abbc3..2b0356bf15dee4c0bdf014e002458ad83992cbea 100644 --- a/tests/stdio/setvbuf.c +++ b/tests/stdio/setvbuf.c @@ -10,5 +10,4 @@ int main(void) { char *in = malloc(30); printf("%s\n", fgets(in, 30, f)); printf("Hello\n"); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/a64l.c b/tests/stdlib/a64l.c index 0ffb73effc6b91344d0f9e8ce20c4b3e9eea00a7..7c44bb84edc3a72b2a45f22a2edbd3310952bc50 100644 --- a/tests/stdlib/a64l.c +++ b/tests/stdlib/a64l.c @@ -18,5 +18,4 @@ int main(void) { return EXIT_FAILURE; } printf("Correct a64l: %s = %ld\n", s, l); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/alloc.c b/tests/stdlib/alloc.c index 4e0b72de3d63e2d18613280b42f8cfbd9eaac17d..b21dfadb187c0f2231774dd339e45b35efca099c 100644 --- a/tests/stdlib/alloc.c +++ b/tests/stdlib/alloc.c @@ -24,6 +24,4 @@ int main(void) { ptra[i] = (char)i; } free(ptra); - - return EXIT_SUCCESS; } diff --git a/tests/stdlib/atof.c b/tests/stdlib/atof.c index f686bd12c2b48e9f599b8285f132441e09bc0932..19f6e25c7753a070c56c26a8b5159bc86a9934cd 100644 --- a/tests/stdlib/atof.c +++ b/tests/stdlib/atof.c @@ -4,5 +4,4 @@ int main(void) { double d = atof("-3.14"); printf("%f\n", d); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/atoi.c b/tests/stdlib/atoi.c index 2960697f02e6d9e521f092c59a66c7428a63ec29..3e06f29c890fdd5d0eb7ffac3912556b853e6c29 100644 --- a/tests/stdlib/atoi.c +++ b/tests/stdlib/atoi.c @@ -8,5 +8,4 @@ int main(void) { printf("%ld\n", atol(" -42")); printf("%ld\n", atol(" +555")); printf("%ld\n", atol(" 1234567890 ")); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/bsearch.c b/tests/stdlib/bsearch.c index 834e56e2cd043c81a3b6587ab815bb693b16107f..a56756a77a001a412e0f84dc9577d358709d2c27 100644 --- a/tests/stdlib/bsearch.c +++ b/tests/stdlib/bsearch.c @@ -53,5 +53,4 @@ int main(void) { BSEARCH_TEST_INT(x, big, 7, NULL); printf("PASS bsearch\n"); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/div.c b/tests/stdlib/div.c index 9939f07b47def02e67e6421f0d7f50cdd1449da6..394e8423789cd842223f8382276ba1ddc2e8a6a9 100644 --- a/tests/stdlib/div.c +++ b/tests/stdlib/div.c @@ -16,8 +16,5 @@ int main(void) { ll = mydivt.rem; ll = atoll("10"); _Exit(0); - - ; - return EXIT_SUCCESS; } diff --git a/tests/stdlib/mkostemps.c b/tests/stdlib/mkostemps.c index 5af996f6b35b9cd4e958211d718a425924a98798..aa544e9aa7d1818d59f70ead054ee0d5a360bc91 100644 --- a/tests/stdlib/mkostemps.c +++ b/tests/stdlib/mkostemps.c @@ -23,5 +23,4 @@ int main(void) { } fclose(fp); remove(file_name); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/mktemp.c b/tests/stdlib/mktemp.c index 02c2e72e26cd39a3b7e05b9b42afb28ed419214c..0a23e6ed25522f86edfc6a87082b14aa79154deb 100644 --- a/tests/stdlib/mktemp.c +++ b/tests/stdlib/mktemp.c @@ -8,5 +8,4 @@ int main(void) { mktemp(string); printf("%s\n",string); free(string); - return EXIT_SUCCESS; } diff --git a/tests/stdlib/strtol.c b/tests/stdlib/strtol.c index 283a622c05d8673442c46babfa6b562a5449b9aa..2977d64747fcdc6f9936f4eaab798ff7391c32e7 100644 --- a/tests/stdlib/strtol.c +++ b/tests/stdlib/strtol.c @@ -26,6 +26,4 @@ int main(void) { if(errno != 0) { printf("errno is not 0 (%d), something went wrong\n", errno); } - - return EXIT_SUCCESS; } diff --git a/tests/stdlib/strtoul.c b/tests/stdlib/strtoul.c index d33ca9b7f8f392b715bcbce52499187438e0bffe..afb903cb386287a4f3b5761f70682eb0e4bc4df7 100644 --- a/tests/stdlib/strtoul.c +++ b/tests/stdlib/strtoul.c @@ -25,6 +25,4 @@ int main(void) { if(errno != 0) { printf("errno is not 0 (%d), something went wrong\n", errno); } - - return EXIT_SUCCESS; } diff --git a/tests/stdlib/system.c b/tests/stdlib/system.c index 9b3270eb79aab17730d6941f693721455976ced2..5e9d662cd64a4ac34f736e67b5060264415a5b32 100644 --- a/tests/stdlib/system.c +++ b/tests/stdlib/system.c @@ -2,5 +2,4 @@ int main(void) { system("echo test of system"); - return EXIT_SUCCESS; } diff --git a/tests/string/mem.c b/tests/string/mem.c index 9c8db1e8c06d9bb73f35124e5d6d5b102299051f..2b717d6c75527cb7b68294958d87890aed5c196a 100644 --- a/tests/string/mem.c +++ b/tests/string/mem.c @@ -38,5 +38,4 @@ int main(void) { return EXIT_FAILURE; } puts("Correct memcmp"); - return EXIT_SUCCESS; } diff --git a/tests/string/strcat.c b/tests/string/strcat.c index cb58004d1d37743ee7a852f69762ec1c6d6ebff3..0653b7f480140ccfc1be13539c185c4ead42017d 100644 --- a/tests/string/strcat.c +++ b/tests/string/strcat.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char dest1[12] = "hello"; @@ -8,6 +7,4 @@ int main(void) { char dest2[12] = "hello"; printf("%s\n", strncat(dest2, " world foobar", 6)); // should be hello world - - return EXIT_SUCCESS; } diff --git a/tests/string/strchr.c b/tests/string/strchr.c index 3273d88a7359758c3423555070d6d9815f8e96dc..fb2e07e056fa060c849a7e26387f1271ebe7b6a3 100644 --- a/tests/string/strchr.c +++ b/tests/string/strchr.c @@ -1,11 +1,8 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { printf("%s\n", strchr("hello", 'e')); // should be ello printf("%s\n", strchr("world", 'l')); // should be ld printf("%i\n", strchr("world", 0) == NULL); // should be 1 - - return EXIT_SUCCESS; } diff --git a/tests/string/strcspn.c b/tests/string/strcspn.c index 8511b95cb96cff3234362e28899aa1f44fe7726a..7370558c912acae854736f54b6648d1ddee267d0 100644 --- a/tests/string/strcspn.c +++ b/tests/string/strcspn.c @@ -1,11 +1,8 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char *world = "world"; printf("%ld\n", strcspn("hello", world)); // should be 2 printf("%ld\n", strcspn("banana", world)); // should be 6 - - return EXIT_SUCCESS; } diff --git a/tests/string/strncmp.c b/tests/string/strncmp.c index 913200be7cd15cdc3659836c5d4fbbaa3360b7b0..fd4033c8e650369f7dc443f6f1d18600e1f2bd90 100644 --- a/tests/string/strncmp.c +++ b/tests/string/strncmp.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { printf("%d\n", strncmp("a", "aa", 2)); @@ -9,6 +8,4 @@ int main(void) { printf("%d\n", strncmp("", "\xFF", 1)); printf("%d\n", strncmp("a", "c", 1)); printf("%d\n", strncmp("a", "a", 2)); - - return EXIT_SUCCESS; } diff --git a/tests/string/strpbrk.c b/tests/string/strpbrk.c index d61de169565023ea4c2f0f47949b042d769e613a..bb5ca56ee0d9f0adac1f99635d521f883291fda8 100644 --- a/tests/string/strpbrk.c +++ b/tests/string/strpbrk.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char* source = "The quick drawn fix jumps over the lazy bug"; @@ -15,7 +14,5 @@ int main(void) { // should be "NULL" char* res3 = strpbrk(source, "404"); - printf("%s\n", (res3) ? res3 : "NULL"); - - return EXIT_SUCCESS; + printf("%s\n", (res3) ? res3 : "NULL"); } diff --git a/tests/string/strrchr.c b/tests/string/strrchr.c index c8d2f65ad54dba6e15bd5eb7d48be74e2fab0cb7..d32c244ff19dc670fd3c91eb137c779fb2bb6646 100644 --- a/tests/string/strrchr.c +++ b/tests/string/strrchr.c @@ -18,5 +18,4 @@ int main(void) { return EXIT_FAILURE; } printf("strrch PASS, exiting with status code %d\n", 0); - return EXIT_SUCCESS; } diff --git a/tests/string/strspn.c b/tests/string/strspn.c index cd9316fad739d7115d3c38057da157189cca993e..c198a20bf0b4bc43d862df8419663e4634aeb5fc 100644 --- a/tests/string/strspn.c +++ b/tests/string/strspn.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char *hello = "hello"; @@ -9,6 +8,4 @@ int main(void) { printf("%lu\n", strspn(hello, "hello")); // should be 5 printf("%lu\n", strspn(world, "wendy")); // should be 1 printf("%lu\n", strspn(banana, "apple")); // should be 0 - - return EXIT_SUCCESS; } diff --git a/tests/string/strstr.c b/tests/string/strstr.c index 1e9f38cf97d3c027a0f9e963382ab1f0fa61fed7..d36b4d915a5d888b7ea44aac25bdbc642a039dd0 100644 --- a/tests/string/strstr.c +++ b/tests/string/strstr.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { printf("%s\n", strstr("In relibc we trust", "rust")); @@ -8,6 +7,4 @@ int main(void) { printf("%s\n", strstr("In relibc we trust", "bugs")); printf("%s\n", strstr("IN RELIBC WE TRUST", "rust")); printf("%s\n", strcasestr("IN RELIBC WE TRUST", "rust")); - - return EXIT_SUCCESS; } diff --git a/tests/string/strtok.c b/tests/string/strtok.c index cfa716fe7f1b9e7b99b03d6dd99839f1d82dda97..d2e066acb368cdfdef89ec28301f36d3e36a86b8 100644 --- a/tests/string/strtok.c +++ b/tests/string/strtok.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char source[] = "I'd just like to interject for a moment. What you're referring to as Linux, " @@ -13,6 +12,4 @@ int main(void) { printf("_"); } } - - return EXIT_SUCCESS; } diff --git a/tests/string/strtok_r.c b/tests/string/strtok_r.c index 2abe530b0efab7069482e3ad6ede12e261dd6442..8873635c69dc6c4fef027280c0953097e0c4a8dd 100644 --- a/tests/string/strtok_r.c +++ b/tests/string/strtok_r.c @@ -1,6 +1,5 @@ #include <string.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char source[] = "I'd just like to interject for a moment. What you're referring to as Linux, " @@ -14,6 +13,4 @@ int main(void) { printf("_"); } } - - return EXIT_SUCCESS; } diff --git a/tests/time/asctime.c b/tests/time/asctime.c index 2624ec9b7be087bfdf7a73c61614b10afd32034d..f2e57da1a6073a0de1c389cde97f8c46c3e44e01 100644 --- a/tests/time/asctime.c +++ b/tests/time/asctime.c @@ -12,5 +12,4 @@ int main(void) { if (time_string == NULL || strcmp(time_string, "Thu Jan 1 00:00:00 1970\n") != 0) { return EXIT_FAILURE; } - return EXIT_SUCCESS; } diff --git a/tests/time/gmtime.c b/tests/time/gmtime.c index 38d0b8d3471e45a3addf7d5cedf95036c9acda88..09bc97e5ef0383f54d8f24caa3d2e295ea8e58ce 100644 --- a/tests/time/gmtime.c +++ b/tests/time/gmtime.c @@ -24,5 +24,4 @@ int main(void) { info->tm_gmtoff != expected.tm_gmtoff || strcmp(info->tm_zone, expected.tm_zone) != 0) { return EXIT_FAILURE; } - return EXIT_SUCCESS; } diff --git a/tests/time/time.c b/tests/time/time.c index 3c5aed66b7969c51576e79a6489546b30c888484..24d7b28d34e594638ecf010dd097fd287bd31209 100644 --- a/tests/time/time.c +++ b/tests/time/time.c @@ -22,6 +22,4 @@ int main(void) { perror("clock"); return EXIT_FAILURE; } - - return EXIT_SUCCESS; } diff --git a/tests/unistd/brk.c b/tests/unistd/brk.c index 5b4ffc1418eb1f33298969b634adad2fccd4c8d2..811644e28d18e6ef491b1967025670058138ea11 100644 --- a/tests/unistd/brk.c +++ b/tests/unistd/brk.c @@ -1,9 +1,7 @@ #include <unistd.h> #include <stdio.h> -#include <stdlib.h> int main(void) { int status = brk((void*)100); printf("brk exited with status code %d\n", status); - return EXIT_SUCCESS; } diff --git a/tests/unistd/chdir.c b/tests/unistd/chdir.c index eb8341eeb5c2f437461f78e58a26a3c587a253b7..28178922e8005833ccd8550566abcfb351c72613 100644 --- a/tests/unistd/chdir.c +++ b/tests/unistd/chdir.c @@ -12,5 +12,4 @@ int main(void) { getcwd(cwd2, 4096); printf("final cwd: %s\n", cwd2); free(cwd2); - return EXIT_SUCCESS; } diff --git a/tests/unistd/dup.c b/tests/unistd/dup.c index 8a0ca9809e1b65a953024463ba88ddee094952a7..0c7ff8ecb9061a8d17cd29aecb241dc0e5b0fbaa 100644 --- a/tests/unistd/dup.c +++ b/tests/unistd/dup.c @@ -1,7 +1,6 @@ #include <unistd.h> #include <fcntl.h> #include <stdio.h> -#include <stdlib.h> int main(void) { creat("dup.out", 0777); @@ -14,5 +13,4 @@ int main(void) { dup2(fd3, 1); printf("hello fd %d", fd3); close(fd3); - return EXIT_SUCCESS; } diff --git a/tests/unistd/exec.c b/tests/unistd/exec.c index 97eae0fed9f2593411982d7fe1c1f42cd3afdd63..43b10ddccb31bc82ed5f3271b844c1f94c265346 100644 --- a/tests/unistd/exec.c +++ b/tests/unistd/exec.c @@ -1,10 +1,8 @@ #include <unistd.h> #include <stdio.h> -#include <stdlib.h> int main(void) { char* args[] = {"sh", "-c", "echo 'exec works :D'", NULL}; execv("/bin/sh", args); perror("execv"); - return EXIT_SUCCESS; } diff --git a/tests/unistd/fchdir.c b/tests/unistd/fchdir.c index b2b4b7d00d6759130ab46a68edcd43b4b3294c31..9e3ab29b7e6f4ffb5feeb7cd6c697e3087d67c68 100644 --- a/tests/unistd/fchdir.c +++ b/tests/unistd/fchdir.c @@ -1,7 +1,6 @@ #include <unistd.h> #include <fcntl.h> #include <stdio.h> -#include <stdlib.h> int main(void) { int fd = open("..", 0, 0); @@ -9,5 +8,4 @@ int main(void) { status = fchdir(fd); printf("fchdir exited with status code %d\n", status); close(fd); - return EXIT_SUCCESS; } diff --git a/tests/unistd/fsync.c b/tests/unistd/fsync.c index 0db9d00fcfe559cbb2327c4b30cbaba438591d58..7f337f1caa0e4c2826df091b8c81e574921b8c21 100644 --- a/tests/unistd/fsync.c +++ b/tests/unistd/fsync.c @@ -1,7 +1,6 @@ #include <unistd.h> #include <fcntl.h> #include <stdio.h> -#include <stdlib.h> int main(void) { int fd = open(".", 0, 0); @@ -9,5 +8,4 @@ int main(void) { status = fsync(fd); printf("fsync exited with status code %d\n", status); close(fd); - return EXIT_SUCCESS; } diff --git a/tests/unistd/ftruncate.c b/tests/unistd/ftruncate.c index df2212cfb335066b88940d940f8fc11216178606..7eb4f9822d02fe7f2c414b1863bf2cc3761c5f3a 100644 --- a/tests/unistd/ftruncate.c +++ b/tests/unistd/ftruncate.c @@ -1,7 +1,6 @@ #include <unistd.h> #include <fcntl.h> #include <stdio.h> -#include <stdlib.h> int main(void) { int fd = creat("ftruncate.out", 0777); @@ -9,5 +8,4 @@ int main(void) { status = ftruncate(fd, 100); printf("ftruncate exited with status code %d\n", status); close(fd); - return EXIT_SUCCESS; } diff --git a/tests/unistd/getid.c b/tests/unistd/getid.c index e0719b4413a84c10b7af92ca79c35963f0640f1d..d2a2bf579c96111c4b0b79d46c08d33997fe69c7 100644 --- a/tests/unistd/getid.c +++ b/tests/unistd/getid.c @@ -1,6 +1,5 @@ #include <unistd.h> #include <stdio.h> -#include <stdlib.h> int main(void) { gid_t egid = getegid(); @@ -12,5 +11,4 @@ int main(void) { uid_t uid = getuid(); printf("egid: %d, euid: %d, gid: %d, pgid: %d, pid: %d, ppid %d, uid %d\n", egid, euid, gid, pgid, pid, ppid, uid); - return EXIT_SUCCESS; } diff --git a/tests/unistd/pathconf.c b/tests/unistd/pathconf.c index c878efb24e3b05ada40245ce3e854375d4061719..5aeaee8b6739561c40ee03a35e2ffdbb07ad1012 100644 --- a/tests/unistd/pathconf.c +++ b/tests/unistd/pathconf.c @@ -1,6 +1,5 @@ #include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <unistd.h> #define PC(N) { \ @@ -30,5 +29,4 @@ int main(void) { PC(ALLOC_SIZE_MIN); PC(SYMLINK_MAX); PC(2_SYMLINKS); - return EXIT_SUCCESS; } diff --git a/tests/unistd/pipe.c b/tests/unistd/pipe.c index 320b3906d7415895523c4867e0acb5bc4a1f517c..90dfa6464148b8dd544f9091f69a485005b7ff9f 100644 --- a/tests/unistd/pipe.c +++ b/tests/unistd/pipe.c @@ -67,5 +67,4 @@ int main(void) { return EXIT_SUCCESS; } - return EXIT_SUCCESS; } diff --git a/tests/unistd/rmdir.c b/tests/unistd/rmdir.c index 2af003c3fe249b4ed2393809f6e0885f5c1c5bac..212ad48dab8a7894ace0a398eed9cf94ea611632 100644 --- a/tests/unistd/rmdir.c +++ b/tests/unistd/rmdir.c @@ -1,11 +1,9 @@ #include <unistd.h> #include <sys/stat.h> #include <stdio.h> -#include <stdlib.h> int main(void) { mkdir("foo", 0); int status = rmdir("foo"); printf("rmdir exited with status code %d\n", status); - return EXIT_SUCCESS; } diff --git a/tests/unistd/setid.c b/tests/unistd/setid.c index f267814d13d5c6d02c64ad66d3200a256d4b2809..5a35bbb54f10bf0fbf571d76727285d27f3c0eb3 100644 --- a/tests/unistd/setid.c +++ b/tests/unistd/setid.c @@ -4,7 +4,6 @@ #include <stdio.h> #include <sys/types.h> #include <unistd.h> -#include <stdlib.h> int main(void) { if( setpgid( getpid(), 0 ) == -1 ) { @@ -22,5 +21,4 @@ int main(void) { perror( "setreuid" ); } printf("%d has euid %d and uid %d\n", getpid(), geteuid(), getuid()); - return EXIT_SUCCESS; } diff --git a/tests/unistd/sleep.c b/tests/unistd/sleep.c index ab27aa303bac783ad8f4b150c05185d83c5d71a0..7aa46108c96f42ceae0799b104232ebe7f99b608 100644 --- a/tests/unistd/sleep.c +++ b/tests/unistd/sleep.c @@ -1,7 +1,6 @@ #include <time.h> #include <unistd.h> #include <stdio.h> -#include <stdlib.h> int main(void) { sleep(2); @@ -11,5 +10,4 @@ int main(void) { struct timespec tm = {0, 10000}; nanosleep(&tm, NULL); perror("nanosleep"); - return EXIT_SUCCESS; } diff --git a/tests/unistd/sysconf.c b/tests/unistd/sysconf.c index 9aca5f418795731fe910e464902d22745f87d4db..be64b647c6cfefce5d6ce1b4993cb6f2ee8f1180 100644 --- a/tests/unistd/sysconf.c +++ b/tests/unistd/sysconf.c @@ -1,6 +1,5 @@ #include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <unistd.h> #define SC(N) { \ @@ -23,5 +22,4 @@ int main(void) { SC(TTY_NAME_MAX); SC(SYMLOOP_MAX); SC(HOST_NAME_MAX); - return EXIT_SUCCESS; } diff --git a/tests/unistd/write.c b/tests/unistd/write.c index e9af15ab7a76c04e3f8ce68b443eed395deece6e..47cc4e0213834108763f653d2d744ae8dab7ca2b 100644 --- a/tests/unistd/write.c +++ b/tests/unistd/write.c @@ -1,7 +1,5 @@ -#include <stdlib.h> #include <unistd.h> int main(void) { write(STDOUT_FILENO, "Hello World!\n", 13); - return EXIT_SUCCESS; } diff --git a/tests/waitpid.c b/tests/waitpid.c index 5f94f5b7ca18147391af68166b21d427c00aca55..e25011d89a0506a0d24514d28de52601df493775 100644 --- a/tests/waitpid.c +++ b/tests/waitpid.c @@ -13,5 +13,4 @@ int main(void) { int stat_loc; waitpid(pid, &stat_loc, 0); } - return EXIT_SUCCESS; } diff --git a/tests/wchar/putwchar.c b/tests/wchar/putwchar.c index 0380d5ae335f07422759444207f03cb70f09cc1e..db5e276acc2a40e4990724e731ad525376de3429 100644 --- a/tests/wchar/putwchar.c +++ b/tests/wchar/putwchar.c @@ -15,6 +15,4 @@ int main(void) { return EXIT_FAILURE; } } - - return EXIT_SUCCESS; }