commit 742e5bd1b66cc57b0b7e10b9fcd676121f6f748f parent 1b435684a7a6ab12d2b85afa775ec629c0ce6a19 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Tue, 23 Nov 2021 12:57:55 +0300 Tests: explicitly enforced zero or one exit codes Diffstat:
34 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/testcurl/https/test_tls_extensions.c b/src/testcurl/https/test_tls_extensions.c @@ -296,5 +296,5 @@ main (int argc, char *const *argv) curl_global_cleanup (); fclose (test_fd); - return errorCount; + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c @@ -383,5 +383,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c @@ -562,5 +562,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c @@ -308,5 +308,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c @@ -321,5 +321,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c @@ -281,5 +281,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c @@ -1021,5 +1021,5 @@ main (int argc, char *const *argv) else if (verbose) printf ("All tests passed.\n"); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c @@ -796,5 +796,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_get_empty.c b/src/testcurl/test_get_empty.c @@ -961,5 +961,5 @@ main (int argc, char *const *argv) else if (verbose) printf ("All tests passed.\n"); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_get_iovec.c b/src/testcurl/test_get_iovec.c @@ -773,5 +773,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c @@ -475,5 +475,5 @@ main (int argc, char *const *argv) errorCount += testExternalGet (); if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c @@ -664,5 +664,5 @@ main (int argc, char *const *argv) curl_global_cleanup (); unlink (sourcefile); free (sourcefile); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c @@ -359,5 +359,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c @@ -306,5 +306,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_parse_cookies.c b/src/testcurl/test_parse_cookies.c @@ -313,5 +313,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c @@ -530,5 +530,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c @@ -836,5 +836,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c @@ -690,5 +690,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c @@ -640,5 +640,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_process_arguments.c b/src/testcurl/test_process_arguments.c @@ -312,5 +312,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c @@ -572,5 +572,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c @@ -574,5 +574,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c @@ -566,5 +566,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c @@ -596,5 +596,5 @@ main (int argc, char *const *argv) "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c @@ -378,5 +378,5 @@ main (int argc, char *const *argv) "Error during test execution (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c @@ -218,5 +218,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c @@ -329,5 +329,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c @@ -360,5 +360,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c @@ -261,5 +261,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c @@ -412,5 +412,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c @@ -428,5 +428,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c @@ -376,5 +376,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c @@ -391,5 +391,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ } diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c @@ -399,5 +399,5 @@ main (int argc, char *const *argv) if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); curl_global_cleanup (); - return errorCount != 0; /* 0 == pass */ + return (0 == errorCount) ? 0 : 1; /* 0 == pass */ }