Use new common flags and fix resulting warnings.
[openssl.git] / ssl / s2_pkt.c
index 1a54765fec2c354444251d40c63bb0c03f38e008..ac963b2d47d6e369adc012ffac5c8df4ddc7f4bb 100644 (file)
@@ -130,7 +130,7 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek)
        unsigned char mac[MAX_MAC_SIZE];
        unsigned char *p;
        int i;
-       unsigned int mac_size;
+       int mac_size;
 
  ssl2_read_again:
        if (SSL_in_init(s) && !s->in_handshake)
@@ -263,7 +263,7 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek)
                /* added a check for length > max_size in case
                 * encryption was not turned on yet due to an error */
                if ((!s->s2->clear_text) &&
-                       (s->s2->rlength >= mac_size))
+                       (s->s2->rlength >= (unsigned int)mac_size))
                        {
                        ssl2_enc(s,0);
                        s->s2->ract_data_length-=mac_size;
@@ -515,7 +515,8 @@ static int write_pending(SSL *s, const unsigned char *buf, unsigned int len)
 
 static int n_do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len)
        {
-       unsigned int j,k,olen,p,mac_size,bs;
+       unsigned int j,k,olen,p,bs;
+       int mac_size;
        register unsigned char *pp;
 
        olen=len;