From: Richard Levitte Date: Mon, 17 Jan 2000 00:49:52 +0000 (+0000) Subject: It doesn't make sense to try see if these variables are negative, since they're unsigned. X-Git-Tag: OpenSSL_0_9_5beta1~259 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b058a08085af113a6b82f9d7a2066bba1491c244;p=openssl It doesn't make sense to try see if these variables are negative, since they're unsigned. --- diff --git a/apps/speed.c b/apps/speed.c index 59caa0db34..c4fd79f884 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -1044,7 +1044,7 @@ int MAIN(int argc, char **argv) { rsa_num=DSA_sign(EVP_PKEY_DSA,buf,20,buf2, &kk,dsa_key[j]); - if (rsa_num <= 0) + if (rsa_num == 0) { BIO_printf(bio_err,"DSA sign failure\n"); ERR_print_errors(bio_err); @@ -1067,7 +1067,7 @@ int MAIN(int argc, char **argv) { rsa_num2=DSA_verify(EVP_PKEY_DSA,buf,20,buf2, kk,dsa_key[j]); - if (rsa_num2 <= 0) + if (rsa_num2 == 0) { BIO_printf(bio_err,"DSA verify failure\n"); ERR_print_errors(bio_err); diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 40df575af9..272d3c921b 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -250,7 +250,7 @@ static size_t bio_nread(BIO *bio, char **buf, size_t num) available = bio_nread0(bio, buf); if (num > available) num = available; - if (num <= 0) + if (num == 0) return num; b = bio->ptr; @@ -406,7 +406,7 @@ static size_t bio_nwrite(BIO *bio, char **buf, size_t num) space = bio_nwrite0(bio, buf); if (num > space) num = space; - if (num <= 0) + if (num == 0) return num; b = bio->ptr; assert(b != NULL); diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index ae8b981eee..cac7953e31 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -548,7 +548,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, /* if it went, fall through and send more stuff */ } - if (len <= 0) return(len); + if (len == 0) return(len); wr= &(s->s3->wrec); wb= &(s->s3->wbuf); @@ -962,7 +962,7 @@ start: memcpy(buf,&(rr->data[rr->off]),(unsigned int)n); rr->length-=n; rr->off+=n; - if (rr->length <= 0) + if (rr->length == 0) { s->rstate=SSL_ST_READ_HEADER; rr->off=0;