Reorder inclusion of header files:
[openssl.git] / ssl / t1_srvr.c
index 8b18572..6e765e5 100644 (file)
  */
 
 #include <stdio.h>
-#include "buffer.h"
-#include "rand.h"
-#include "objects.h"
-#include "evp.h"
-#include "x509.h"
 #include "ssl_locl.h"
+#include <openssl/buffer.h>
+#include <openssl/rand.h>
+#include <openssl/objects.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
 
-#ifndef NOPROTO
 static SSL_METHOD *tls1_get_server_method(int ver);
-#else
-static SSL_METHOD *tls1_get_server_method();
-#endif
-
-static SSL_METHOD *tls1_get_server_method(ver)
-int ver;
+static SSL_METHOD *tls1_get_server_method(int ver)
        {
        if (ver == TLS1_VERSION)
                return(TLSv1_server_method());
@@ -79,18 +73,18 @@ int ver;
                return(NULL);
        }
 
-SSL_METHOD *TLSv1_server_method()
+SSL_METHOD *TLSv1_server_method(void)
        {
        static int init=1;
        static SSL_METHOD TLSv1_server_data;
 
        if (init)
                {
-               init=0;
                memcpy((char *)&TLSv1_server_data,(char *)tlsv1_base_method(),
                        sizeof(SSL_METHOD));
                TLSv1_server_data.ssl_accept=ssl3_accept;
                TLSv1_server_data.get_ssl_method=tls1_get_server_method;
+               init=0;
                }
        return(&TLSv1_server_data);
        }