make sure error queue is totally emptied
authorNils Larsch <nils@openssl.org>
Thu, 7 Apr 2005 22:53:35 +0000 (22:53 +0000)
committerNils Larsch <nils@openssl.org>
Thu, 7 Apr 2005 22:53:35 +0000 (22:53 +0000)
PR: 359

crypto/asn1/a_d2i_fp.c
crypto/conf/conf_lib.c
crypto/conf/conf_mod.c
crypto/objects/obj_dat.c
crypto/pkcs7/bio_ber.c
crypto/rand/md_rand.c

index 1356a0a..9c307dc 100644 (file)
@@ -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 */
index 6a3cf10..a55a545 100644 (file)
@@ -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;
        }
index d45adea..bae9fca 100644 (file)
@@ -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);
index 700a0b6..e56f3de 100644 (file)
@@ -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 */
index 895a911..31973fc 100644 (file)
@@ -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);
index 87fd945..6e10f6e 100644 (file)
@@ -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);
        }