libmicrohttpd

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

commit bb93b2b5c24003da26a0b95bb7233b24325d09ee
parent f37d75d1f967245e8612a0afc96946c10c96eef2
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 23 Jan 2016 13:08:27 +0000

-avoid theoretical issue with error_count overflowing depending on libcurl errnos

Diffstat:
Msrc/testcurl/https/test_https_sni.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c @@ -1,6 +1,6 @@ /* This file is part of libmicrohttpd - Copyright (C) 2013 Christian Grothoff + Copyright (C) 2013, 2016 Christian Grothoff libmicrohttpd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -271,12 +271,14 @@ main (int argc, char *const *argv) fprintf (stderr, MHD_E_SERVER_INIT); return -1; } - error_count += do_get ("https://host1:4233/"); - error_count += do_get ("https://host2:4233/"); + if (0 != do_get ("https://host1:4233/")) + error_count++; + if (0 != do_get ("https://host2:4233/")) + error_count++; MHD_stop_daemon (d); curl_global_cleanup (); - return error_count != 0; + return (0 != error_count) ? 1 : 0; }