Don't return stuff from void functions.
[openssl.git] / crypto / asn1 / a_d2i_fp.c
index 5c9c9cf09b356a9f2d2e24c114f0508aca5a2dcd..a49d1cb2897746eca4e6f3bebf22af32826d89d7 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/asn1/a_d2i_fp.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "buffer.h"
-#include "asn1_mac.h"
+#include <openssl/buffer.h>
+#include <openssl/asn1_mac.h>
 
 #define HEADER_SIZE   8
 
-#ifndef WIN16
-char *ASN1_d2i_fp(xnew,d2i,in,x)
-char *(*xnew)();
-char *(*d2i)();
-FILE *in;
-unsigned char **x;
+#ifndef NO_FP_API
+char *ASN1_d2i_fp(char *(*xnew)(), char *(*d2i)(), FILE *in,
+            unsigned char **x)
         {
         BIO *b;
         char *ret;
@@ -85,11 +82,8 @@ unsigned char **x;
         }
 #endif
 
-char *ASN1_d2i_bio(xnew,d2i,in,x)
-char *(*xnew)();
-char *(*d2i)();
-BIO *in;
-unsigned char **x;
+char *ASN1_d2i_bio(char *(*xnew)(), char *(*d2i)(), BIO *in,
+            unsigned char **x)
        {
        BUF_MEM *b;
        unsigned char *p;
@@ -108,6 +102,7 @@ unsigned char **x;
                return(NULL);
                }
 
+       ERR_clear_error();
        for (;;)
                {
                if (want >= (len-off))