Reorder inclusion of header files:
[openssl.git] / ssl / t1_clnt.c
index 986d243..9ad518f 100644 (file)
  */
 
 #include <stdio.h>
-#include "buffer.h"
-#include "rand.h"
-#include "objects.h"
-#include "evp.h"
 #include "ssl_locl.h"
+#include <openssl/buffer.h>
+#include <openssl/rand.h>
+#include <openssl/objects.h>
+#include <openssl/evp.h>
 
-static SSL_METHOD *tls1_get_client_method(ver)
-int ver;
+static SSL_METHOD *tls1_get_client_method(int ver);
+static SSL_METHOD *tls1_get_client_method(int ver)
        {
        if (ver == TLS1_VERSION)
                return(TLSv1_client_method());
@@ -72,18 +72,18 @@ int ver;
                return(NULL);
        }
 
-SSL_METHOD *TLSv1_client_method()
+SSL_METHOD *TLSv1_client_method(void)
        {
        static int init=1;
        static SSL_METHOD TLSv1_client_data;
 
        if (init)
                {
-               init=0;
                memcpy((char *)&TLSv1_client_data,(char *)tlsv1_base_method(),
                        sizeof(SSL_METHOD));
                TLSv1_client_data.ssl_connect=ssl3_connect;
                TLSv1_client_data.get_ssl_method=tls1_get_client_method;
+               init=0;
                }
        return(&TLSv1_client_data);
        }