From: Nils Larsch Date: Thu, 7 Apr 2005 22:53:35 +0000 (+0000) Subject: make sure error queue is totally emptied X-Git-Tag: OpenSSL_0_9_7g~7^2~4 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=f763e0b5ae74c67795d096c9029b5c61e891e68a make sure error queue is totally emptied PR: 359 --- diff --git a/crypto/asn1/a_d2i_fp.c b/crypto/asn1/a_d2i_fp.c index 1356a0a260..9c307dcf4d 100644 --- a/crypto/asn1/a_d2i_fp.c +++ b/crypto/asn1/a_d2i_fp.c @@ -197,7 +197,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb) if (e != ASN1_R_TOO_LONG) goto err; else - ERR_get_error(); /* clear error */ + ERR_clear_error(); /* clear error */ } i=c.p-p;/* header length */ off+=i; /* end of data */ diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 6a3cf109dd..a55a5457c6 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -184,7 +184,7 @@ long CONF_get_number(LHASH *conf,const char *group,const char *name) if (status == 0) { /* This function does not believe in errors... */ - ERR_get_error(); + ERR_clear_error(); } return result; } diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index d45adea851..bae9fcaffa 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -254,7 +254,7 @@ static CONF_MODULE *module_load_dso(const CONF *cnf, char *name, char *value, path = NCONF_get_string(cnf, value, "path"); if (!path) { - ERR_get_error(); + ERR_clear_error(); path = name; } dso = DSO_load(NULL, path, NULL, 0); diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 700a0b6d3c..e56f3dea09 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -414,7 +414,7 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) i=a2d_ASN1_OBJECT(NULL,0,s,-1); if (i <= 0) { /* Clear the error */ - ERR_get_error(); + ERR_clear_error(); return NULL; } /* Work out total size */ diff --git a/crypto/pkcs7/bio_ber.c b/crypto/pkcs7/bio_ber.c index 895a91177b..31973fcd1f 100644 --- a/crypto/pkcs7/bio_ber.c +++ b/crypto/pkcs7/bio_ber.c @@ -204,7 +204,7 @@ int bio_ber_get_header(BIO *bio, BIO_BER_CTX *ctx) if ((ctx->buf_len < BER_BUF_SIZE) && (ERR_GET_REASON(ERR_peek_error()) == ASN1_R_TOO_LONG)) { - ERR_get_error(); /* clear the error */ + ERR_clear_error(); /* clear the error */ BIO_set_retry_read(b); } return(-1); diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 87fd9455e2..6e10f6ef67 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -520,7 +520,7 @@ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) err = ERR_peek_error(); if (ERR_GET_LIB(err) == ERR_LIB_RAND && ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED) - (void)ERR_get_error(); + ERR_clear_error(); } return (ret); }