The previous revision should have generated _more_ warnings, not less ...
authorBodo Möller <bodo@openssl.org>
Fri, 25 Feb 2000 15:32:36 +0000 (15:32 +0000)
committerBodo Möller <bodo@openssl.org>
Fri, 25 Feb 2000 15:32:36 +0000 (15:32 +0000)
The return value of handshake_func is signed, not unsigned.

ssl/s3_pkt.c

index 6d9dad9040208606ef1ea298641828cb373d3171..a407c9d741d7672d1e01b5ffa9aa608e3ab231d0 100644 (file)
@@ -706,8 +706,8 @@ static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
  */
 int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len)
        {
-       int al,j,ret;
-       unsigned int i,n;
+       int al,i,j,ret;
+       unsigned int n;
        SSL3_RECORD *rr;
        void (*cb)()=NULL;
 
@@ -890,9 +890,9 @@ start:
                        ssl3_renegotiate(s);
                        if (ssl3_renegotiate_check(s))
                                {
-                               n=s->handshake_func(s);
-                               if (n < 0) return(n);
-                               if (n == 0)
+                               i=s->handshake_func(s);
+                               if (i < 0) return(i);
+                               if (i == 0)
                                        {
                                        SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_SSL_HANDSHAKE_FAILURE);
                                        return(-1);