* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2013 - 2016, Linus Nielsen Feltzing, <linus@haxx.se>
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
{
char urlbuf[256];
- sprintf(urlbuf, "%s%s", base_url, urlstring[handlenum]);
+ snprintf(urlbuf, sizeof(urlbuf), "%s%s", base_url, urlstring[handlenum]);
curl_easy_setopt(handles[handlenum], CURLOPT_URL, urlbuf);
curl_easy_setopt(handles[handlenum], CURLOPT_VERBOSE, 1L);
curl_easy_setopt(handles[handlenum], CURLOPT_FAILONERROR, 1L);
abort_on_test_timeout();
/* See how the transfers went */
- while ((msg = curl_multi_info_read(m, &msgs_left))) {
- if (msg->msg == CURLMSG_DONE) {
+ while((msg = curl_multi_info_read(m, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
int i, found = 0;
/* Find out which handle this message is about */
- for (i = 0; i < num_handles; i++) {
+ for(i = 0; i < num_handles; i++) {
found = (msg->easy_handle == handles[i]);
if(found)
break;