Add a missing comma in OPENSSL_malloc.pod
[openssl.git] / doc / crypto / BIO_s_connect.pod
index 436ce33742ed57fd54a5dc73b400d9d84da2a091..d97d5899a521fa0373db650bab478f3300b54f0c 100644 (file)
@@ -167,16 +167,17 @@ to retrieve a page and copy the result to standard output.
 
  cbio = BIO_new_connect("localhost:http");
  out = BIO_new_fp(stdout, BIO_NOCLOSE);
- if(BIO_do_connect(cbio) <= 0) {
-        fprintf(stderr, "Error connecting to server\n");
-        ERR_print_errors_fp(stderr);
-        /* whatever ... */
       }
+ if (BIO_do_connect(cbio) <= 0) {
+     fprintf(stderr, "Error connecting to server\n");
+     ERR_print_errors_fp(stderr);
+     exit(1);
+ }
  BIO_puts(cbio, "GET / HTTP/1.0\n\n");
- for(;;) {      
-        len = BIO_read(cbio, tmpbuf, 1024);
-        if(len <= 0) break;
-        BIO_write(out, tmpbuf, len);
+ for ( ; ; ) {
+     len = BIO_read(cbio, tmpbuf, 1024);
+     if(len <= 0)
+         break;
+     BIO_write(out, tmpbuf, len);
  }
  BIO_free(cbio);
  BIO_free(out);
@@ -186,8 +187,6 @@ to retrieve a page and copy the result to standard output.
 
 L<BIO_ADDR(3)>
 
-=cut
-
 =head1 COPYRIGHT
 
 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.