aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/NULL.c
diff options
context:
space:
mode:
Diffstat (limited to 'skeletons/NULL.c')
-rw-r--r--skeletons/NULL.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/skeletons/NULL.c b/skeletons/NULL.c
index 77a377e1..a43d412b 100644
--- a/skeletons/NULL.c
+++ b/skeletons/NULL.c
@@ -135,15 +135,24 @@ NULL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_dec_rval_t
NULL_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
- const asn_oer_constraints_t *constraints, void **struct_ptr,
+ const asn_oer_constraints_t *constraints, void **sptr,
const void *ptr, size_t size) {
asn_dec_rval_t rv = {RC_OK, 0};
(void)opt_codec_ctx;
(void)td;
(void)constraints;
- (void)struct_ptr;
(void)ptr;
(void)size;
+
+ if(!*sptr) {
+ *sptr = MALLOC(sizeof(NULL_t));
+ if(*sptr) {
+ *(NULL_t *)*sptr = 0;
+ } else {
+ ASN__DECODE_FAILED;
+ }
+ }
+
return rv;
}