mirror of https://gerrit.osmocom.org/asn1c
added consts
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@9 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
27c7df0a73
commit
4d951ef0f4
|
@ -456,12 +456,14 @@ CHOICE_outmost_tag(asn1_TYPE_descriptor_t *td, const void *ptr, int tag_mode, be
|
||||||
|
|
||||||
if(present > 0 || present <= specs->elements_count) {
|
if(present > 0 || present <= specs->elements_count) {
|
||||||
asn1_CHOICE_element_t *elm = &specs->elements[present-1];
|
asn1_CHOICE_element_t *elm = &specs->elements[present-1];
|
||||||
void *memb_ptr;
|
const void *memb_ptr;
|
||||||
|
|
||||||
if(elm->optional) {
|
if(elm->optional) {
|
||||||
memb_ptr = *(void **)((char *)ptr + elm->memb_offset);
|
memb_ptr = *(const void * const *)
|
||||||
|
((const char *)ptr + elm->memb_offset);
|
||||||
} else {
|
} else {
|
||||||
memb_ptr = (void *)((char *)ptr + elm->memb_offset);
|
memb_ptr = (const void *)
|
||||||
|
((const char *)ptr + elm->memb_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
return asn1_TYPE_outmost_tag(elm->type, memb_ptr,
|
return asn1_TYPE_outmost_tag(elm->type, memb_ptr,
|
||||||
|
|
Loading…
Reference in New Issue