aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/constr_SET_OF.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-03-10 18:52:02 +0000
committerLev Walkin <vlm@lionet.info>2005-03-10 18:52:02 +0000
commit8c3b8540167e64deaf2f9919d73076cd53a22146 (patch)
treee78d71202acf88959f2d4c7d19b6d9790ec8314d /skeletons/constr_SET_OF.c
parentfb61770425defd50bf20c2b543c43643b99de315 (diff)
added const qualifier
Diffstat (limited to 'skeletons/constr_SET_OF.c')
-rw-r--r--skeletons/constr_SET_OF.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c
index c6ec6af2..84892e78 100644
--- a/skeletons/constr_SET_OF.c
+++ b/skeletons/constr_SET_OF.c
@@ -34,7 +34,7 @@
#undef ADVANCE
#define ADVANCE(num_bytes) do { \
size_t num = num_bytes; \
- ptr = ((char *)ptr) + num; \
+ ptr = ((const char *)ptr) + num;\
size -= num; \
if(ctx->left >= 0) \
ctx->left -= num; \
@@ -67,7 +67,7 @@
*/
asn_dec_rval_t
SET_OF_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
- void **struct_ptr, void *ptr, size_t size, int tag_mode) {
+ void **struct_ptr, const void *ptr, size_t size, int tag_mode) {
/*
* Bring closer parts of structure description.
*/
@@ -166,13 +166,13 @@ SET_OF_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
case -1: RETURN(RC_FAIL);
}
- if(ctx->left < 0 && ((uint8_t *)ptr)[0] == 0) {
+ if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) {
if(LEFT < 2) {
if(SIZE_VIOLATION)
RETURN(RC_FAIL);
else
RETURN(RC_WMORE);
- } else if(((uint8_t *)ptr)[1] == 0) {
+ } else if(((const uint8_t *)ptr)[1] == 0) {
/*
* Found the terminator of the
* indefinite length structure.
@@ -241,15 +241,15 @@ SET_OF_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
*/
while(ctx->left < 0) {
if(LEFT < 2) {
- if(LEFT > 0 && ((char *)ptr)[0] != 0) {
+ if(LEFT > 0 && ((const char *)ptr)[0] != 0) {
/* Unexpected tag */
RETURN(RC_FAIL);
} else {
RETURN(RC_WMORE);
}
}
- if(((char *)ptr)[0] == 0
- && ((char *)ptr)[1] == 0) {
+ if(((const char *)ptr)[0] == 0
+ && ((const char *)ptr)[1] == 0) {
ADVANCE(2);
ctx->left++;
} else {
@@ -452,7 +452,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
#undef XER_ADVANCE
#define XER_ADVANCE(num_bytes) do { \
size_t num = num_bytes; \
- buf_ptr = ((char *)buf_ptr) + num; \
+ buf_ptr = ((const char *)buf_ptr) + num;\
size -= num; \
consumed_myself += num; \
} while(0)
@@ -463,7 +463,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
asn_dec_rval_t
SET_OF_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **struct_ptr, const char *opt_mname,
- void *buf_ptr, size_t size) {
+ const void *buf_ptr, size_t size) {
/*
* Bring closer parts of structure description.
*/