summaryrefslogtreecommitdiff
path: root/src/libecbor
diff options
context:
space:
mode:
authorrimio <vasi.vilvoiu@gmail.com>2018-03-06 00:23:59 +0200
committerrimio <vasi.vilvoiu@gmail.com>2018-03-06 00:23:59 +0200
commit5c43023ce4c837ed70ac0c231e5b79f5fefb1157 (patch)
treecc3009cba8848aa54d8acf483c9f5c966b5f210f /src/libecbor
parente3f3c0d12eb83af50f984332a8ddae6f27197b12 (diff)
Const correctness fixes
Diffstat (limited to 'src/libecbor')
-rw-r--r--src/libecbor/ecbor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libecbor/ecbor.c b/src/libecbor/ecbor.c
index 30d2ac5..92a50f5 100644
--- a/src/libecbor/ecbor.c
+++ b/src/libecbor/ecbor.c
@@ -423,7 +423,7 @@ ECBOR_GET_INTEGER_INTERNAL (item, value, ECBOR_TYPE_NINT, int64_t)
static __attribute__((noinline)) ecbor_error_t
-ecbor_get_string_internal (ecbor_item_t *str, uint8_t **value,
+ecbor_get_string_internal (ecbor_item_t *str, const uint8_t **value,
ecbor_type_t type)
{
ECBOR_INTERNAL_CHECK_ITEM_PTR (str);
@@ -502,9 +502,10 @@ ecbor_get_string_chunk_internal (ecbor_item_t *str, size_t index,
}
ecbor_error_t
-ecbor_get_str (ecbor_item_t *str, char **value)
+ecbor_get_str (ecbor_item_t *str, const char **value)
{
- return ecbor_get_string_internal (str, (uint8_t **)value, ECBOR_TYPE_STR);
+ return ecbor_get_string_internal (str, (const uint8_t **)value,
+ ECBOR_TYPE_STR);
}
ecbor_error_t
@@ -520,7 +521,7 @@ ecbor_get_str_chunk (ecbor_item_t *str, size_t index, ecbor_item_t *chunk)
}
ecbor_error_t
-ecbor_get_bstr (ecbor_item_t *str, uint8_t **value)
+ecbor_get_bstr (ecbor_item_t *str, const uint8_t **value)
{
return ecbor_get_string_internal (str, value, ECBOR_TYPE_BSTR);
}