Don't return stuff from void functions.
[openssl.git] / crypto / asn1 / a_bitstr.c
index cd4d835003cad6dcadc75a996f79a22faa3917e7..b36d62079a968c5295e950f9a3c8a0bfdf8d6249 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "asn1.h"
+#include <openssl/asn1.h>
 
-/* ASN1err(ASN1_F_ASN1_STRING_NEW,ASN1_R_STRING_TOO_SHORT);
- * ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,ASN1_R_EXPECTING_A_BIT_STRING);
- */
+ASN1_BIT_STRING *ASN1_BIT_STRING_new(void)
+{ return M_ASN1_BIT_STRING_new(); }
+
+void ASN1_BIT_STRING_free(ASN1_BIT_STRING *x)
+{ M_ASN1_BIT_STRING_free(x); }
+
+int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len)
+{ return M_ASN1_BIT_STRING_set(x, d, len); }
 
 int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
        {
@@ -125,7 +130,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
 
        if ((a == NULL) || ((*a) == NULL))
                {
-               if ((ret=ASN1_BIT_STRING_new()) == NULL) return(NULL);
+               if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);
                }
        else
                ret=(*a);
@@ -177,7 +182,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
 err:
        ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,i);
        if ((ret != NULL) && ((a == NULL) || (*a != ret)))
-               ASN1_BIT_STRING_free(ret);
+               M_ASN1_BIT_STRING_free(ret);
        return(NULL);
        }