diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-01-23 13:08:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-01-23 13:08:27 +0000 |
commit | bb93b2b5c24003da26a0b95bb7233b24325d09ee (patch) | |
tree | 31330414d60b468ececbd2d1d2b2792bd8904cfc | |
parent | f37d75d1f967245e8612a0afc96946c10c96eef2 (diff) | |
download | libmicrohttpd-bb93b2b5c24003da26a0b95bb7233b24325d09ee.tar.gz libmicrohttpd-bb93b2b5c24003da26a0b95bb7233b24325d09ee.zip |
-avoid theoretical issue with error_count overflowing depending on libcurl errnos
-rw-r--r-- | src/testcurl/https/test_https_sni.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c index cd96622a..50be1499 100644 --- a/src/testcurl/https/test_https_sni.c +++ b/src/testcurl/https/test_https_sni.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libmicrohttpd | 2 | This file is part of libmicrohttpd |
3 | Copyright (C) 2013 Christian Grothoff | 3 | Copyright (C) 2013, 2016 Christian Grothoff |
4 | 4 | ||
5 | libmicrohttpd is free software; you can redistribute it and/or modify | 5 | libmicrohttpd is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -271,12 +271,14 @@ main (int argc, char *const *argv) | |||
271 | fprintf (stderr, MHD_E_SERVER_INIT); | 271 | fprintf (stderr, MHD_E_SERVER_INIT); |
272 | return -1; | 272 | return -1; |
273 | } | 273 | } |
274 | error_count += do_get ("https://host1:4233/"); | 274 | if (0 != do_get ("https://host1:4233/")) |
275 | error_count += do_get ("https://host2:4233/"); | 275 | error_count++; |
276 | if (0 != do_get ("https://host2:4233/")) | ||
277 | error_count++; | ||
276 | 278 | ||
277 | MHD_stop_daemon (d); | 279 | MHD_stop_daemon (d); |
278 | curl_global_cleanup (); | 280 | curl_global_cleanup (); |
279 | return error_count != 0; | 281 | return (0 != error_count) ? 1 : 0; |
280 | } | 282 | } |
281 | 283 | ||
282 | 284 | ||