ec/ecp_nistz256.c: harmonize with latest indent script.
[oweals/openssl.git] / crypto / bio / bss_conn.c
index fd20bbcd0f445cd8fd4d352d717bae25c59a8c11..511660427f6cfa69f0ffed3c3c6a881930d61a02 100644 (file)
 
 #ifndef OPENSSL_NO_SOCK
 
-#ifdef OPENSSL_SYS_WIN16
-#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
-#else
-#define SOCKET_PROTOCOL IPPROTO_TCP
-#endif
-
 #if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
@@ -209,7 +203,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c)
                        c->them.sin_addr.s_addr=htonl(l);
                        c->state=BIO_CONN_S_CREATE_SOCKET;
 
-                       ret=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+                       ret=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
                        if (ret == INVALID_SOCKET)
                                {
                                SYSerr(SYS_F_SOCKET,get_last_socket_error());
@@ -236,7 +230,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c)
                                }
                        c->state=BIO_CONN_S_CONNECT;
 
-#if defined(SO_KEEPALIVE) && !defined(OPENSSL_SYS_MPE)
+#if defined(SO_KEEPALIVE)
                        i=1;
                        i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
                        if (i < 0)
@@ -469,7 +463,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
                break;
        case BIO_C_DO_STATE_MACHINE:
                /* use this one to start the connection */
-               if (!data->state != BIO_CONN_S_OK)
+               if (data->state != BIO_CONN_S_OK)
                        ret=(long)conn_state(b,data);
                else
                        ret=1;
@@ -633,7 +627,7 @@ static int conn_puts(BIO *bp, const char *str)
        return(ret);
        }
 
-BIO *BIO_new_connect(char *str)
+BIO *BIO_new_connect(const char *str)
        {
        BIO *ret;