]> granicus.if.org Git - curl/commitdiff
examples/curlx: Fix code style
authorfmmedeiros <33770074+fmmedeiros@users.noreply.github.com>
Sat, 18 Nov 2017 18:06:35 +0000 (15:06 -0300)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 18 Nov 2017 19:04:33 +0000 (14:04 -0500)
- Add braces around multi-line if statement.

Closes https://github.com/curl/curl/pull/2096

docs/examples/curlx.c

index c36beedfa7d57490cf5666a920ae6e3992bed35b..2aa10aa75ea4ecd9799853a0141b115e4574d8db 100644 (file)
@@ -537,7 +537,7 @@ int main(int argc, char **argv)
              res = curl_easy_perform(p.curl));
   {
     int result = curl_easy_getinfo(p.curl, CURLINFO_CONTENT_TYPE, &response);
-    if(mimetypeaccept && p.verbose)
+    if(mimetypeaccept && p.verbose) {
       if(!strcmp(mimetypeaccept, response))
         BIO_printf(p.errorbio, "the response has a correct mimetype : %s\n",
                    response);
@@ -545,6 +545,7 @@ int main(int argc, char **argv)
         BIO_printf(p.errorbio, "the response doesn\'t have an acceptable "
                    "mime type, it is %s instead of %s\n",
                    response, mimetypeaccept);
+    }
   }
 
   /*** code d'erreur si accept mime ***, egalement code return HTTP != 200 ***/