BIT STRING now stores the number of unused octets in a separate field.
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@498 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/ANY.c b/skeletons/ANY.c
index ae19ab5..d501ca1 100644
--- a/skeletons/ANY.c
+++ b/skeletons/ANY.c
@@ -7,6 +7,11 @@
#include <assert.h>
#include <errno.h>
+static asn_OCTET_STRING_specifics_t asn_DEF_ANY_specs = {
+ sizeof(ANY_t),
+ offsetof(ANY_t, _asn_ctx),
+ 2 /* Special indicator that this is an ANY type */
+};
asn_TYPE_descriptor_t asn_DEF_ANY = {
"ANY",
OCTET_STRING_free,
@@ -19,7 +24,7 @@
0, /* Use generic outmost tag fetcher */
0, 0, 0, 0,
0, 0, /* No members */
- (void *)2 /* Special indicator that this is an ANY type */
+ &asn_DEF_ANY_specs,
};
@@ -94,7 +99,7 @@
if(ANY_fromType(&tmp, td, sptr)) return 0;
- st = (ANY_t *)MALLOC(sizeof(*st));
+ st = (ANY_t *)CALLOC(1, sizeof(ANY_t *));
if(st) {
*st = tmp;
return st;