libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit b6adf207b3923aa1bb74a8646107a63ccd879913
parent 44eec4065139c5558ba8c860a4a590649bfda21a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 10 Jan 2017 19:49:01 +0300

test_large_put: updated to use correct check for "11" in name and return '99' in case of system failures.

Diffstat:
Msrc/testcurl/test_large_put.c | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c @@ -36,6 +36,8 @@ #include <unistd.h> #endif +#include "test_helpers.h" + #if defined(CPU_COUNT) && (CPU_COUNT+0) < 2 #undef CPU_COUNT #endif @@ -470,12 +472,12 @@ main (int argc, char *const *argv) { unsigned int errorCount = 0; - oneone = (NULL != strrchr (argv[0], (int) '/')) ? - (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; + oneone = has_in_name(argv[0], "11"); if (0 != curl_global_init (CURL_GLOBAL_WIN32)) - return 2; + return 99; put_buffer = malloc (PUT_SIZE); - if (NULL == put_buffer) return 1; + if (NULL == put_buffer) + return 99; memset (put_buffer, 1, PUT_SIZE); errorCount += testInternalPut (); errorCount += testMultithreadedPut (); @@ -485,5 +487,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 (errorCount == 0) ? 0 : 1; }