/*
* BOOLEAN basic type description.
*/
-static ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = {
+static const ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2))
};
asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
erval.encoded += 1;
- _ASN_ENCODED_OK(erval);
+ ASN__ENCODED_OK(erval);
}
}
return XPBD_BODY_CONSUMED;
} else {
- if(xer_is_whitespace(chunk_buf, chunk_size))
- return XPBD_NOT_BODY_IGNORE;
- else
- return XPBD_BROKEN_ENCODING;
+ return XPBD_BROKEN_ENCODING;
}
}
(void)ilevel;
(void)flags;
- if(!st) _ASN_ENCODE_FAILED;
+ if(!st) ASN__ENCODE_FAILED;
if(*st) {
- _ASN_CALLBACK("<true/>", 7);
+ ASN__CALLBACK("<true/>", 7);
er.encoded = 7;
} else {
- _ASN_CALLBACK("<false/>", 8);
+ ASN__CALLBACK("<false/>", 8);
er.encoded = 8;
}
- _ASN_ENCODED_OK(er);
+ ASN__ENCODED_OK(er);
cb_failed:
- _ASN_ENCODE_FAILED;
+ ASN__ENCODE_FAILED;
}
int
if(!st) {
st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st)));
- if(!st) _ASN_DECODE_FAILED;
+ if(!st) ASN__DECODE_FAILED;
}
/*
switch(per_get_few_bits(pd, 1)) {
case 1: *st = 1; break;
case 0: *st = 0; break;
- case -1: default: _ASN_DECODE_FAILED;
+ case -1: default: ASN__DECODE_STARVED;
}
ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE");
BOOLEAN_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void *sptr, asn_per_outp_t *po) {
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
- asn_enc_rval_t er;
+ asn_enc_rval_t er = { 0, 0, 0 };
(void)constraints;
- if(!st) _ASN_ENCODE_FAILED;
+ if(!st) ASN__ENCODE_FAILED;
- per_put_few_bits(po, *st ? 1 : 0, 1);
+ if(per_put_few_bits(po, *st ? 1 : 0, 1))
+ ASN__ENCODE_FAILED;
- _ASN_ENCODED_OK(er);
+ ASN__ENCODED_OK(er);
}