aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/OCTET_STRING.c
diff options
context:
space:
mode:
authorvlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2004-12-15 23:23:53 +0000
committervlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2004-12-15 23:23:53 +0000
commitd3c80793802dff945203bf37df43f6a848b304f1 (patch)
tree7f49d62c5beae5913a0e42b315c26d32b04065c0 /skeletons/OCTET_STRING.c
parent82e317b649d040bb5348c953ad849e348487f321 (diff)
C++ compatibility
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@583 59561ff5-6e30-0410-9f3c-9617f08c8826
Diffstat (limited to 'skeletons/OCTET_STRING.c')
-rw-r--r--skeletons/OCTET_STRING.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c
index 5034e426..d1b08741 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -135,7 +135,7 @@ OS__add_stack_el(struct _stack *st) {
nel->got = 0;
/* Retain the nel->cont_level, it's correct. */
} else {
- (void *)nel = CALLOC(1, sizeof(struct _stack_el));
+ nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el));
if(nel == NULL)
return NULL;
@@ -187,7 +187,8 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
* Create the string if does not exist.
*/
if(st == NULL) {
- (void *)st = *os_structure = CALLOC(1, specs->struct_size);
+ *os_structure = CALLOC(1, specs->struct_size);
+ st = (BIT_STRING_t *)*os_structure;
if(st == NULL)
RETURN(RC_FAIL);
}
@@ -212,7 +213,7 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
*/
ctx->ptr = _new_stack();
if(ctx->ptr) {
- (void *)stck = ctx->ptr;
+ stck = (struct _stack *)ctx->ptr;
} else {
RETURN(RC_FAIL);
}
@@ -234,7 +235,7 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
/*
* Fill the stack with expectations.
*/
- (void *)stck = ctx->ptr;
+ stck = (struct _stack *)ctx->ptr;
sel = stck->cur_ptr;
do {
ber_tlv_tag_t tlv_tag;
@@ -409,7 +410,7 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
NEXT_PHASE(ctx);
/* Fall through */
case 2:
- (void *)stck = ctx->ptr;
+ stck = (struct _stack *)ctx->ptr;
sel = stck->cur_ptr;
ASN_DEBUG("Phase 2: Need %ld bytes, size=%ld, alrg=%ld, wn=%d",
(long)sel->left, (long)size, (long)sel->got,