Imported Upstream version 7.50.2
[platform/upstream/curl.git] / tests / libtest / lib540.c
index 62d8dfd..9b3b5a4 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -113,7 +113,7 @@ static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
   if(res)
     return res;
 
-  while (U) {
+  while(U) {
 
     int M = -99;
 
@@ -125,7 +125,7 @@ static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
     if(res)
       return res;
 
-    if (U) {
+    if(U) {
       FD_ZERO(&R);
       FD_ZERO(&W);
       FD_ZERO(&E);
@@ -200,7 +200,7 @@ int test(char *URL)
   if(test_argc < 4)
     return 99;
 
-  sprintf(buffer, "Host: %s", HOST);
+  snprintf(buffer, sizeof(buffer), "Host: %s", HOST);
 
   /* now add a custom Host: header */
   headers = curl_slist_append(headers, buffer);