mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
suit: Mark conversion function arguments as const
Small cleanup to mark arguments of the conversion functions for param to cbor and vice versa as const where possible
This commit is contained in:
parent
8159819087
commit
ea007ada05
@ -207,8 +207,8 @@ int suit_handle_manifest_structure_bstr(suit_manifest_t *manifest,
|
||||
* @returns The offset of the nanocbor value inside the manifest
|
||||
* bytestring
|
||||
*/
|
||||
uint16_t suit_param_ref_to_cbor(suit_manifest_t *manifest,
|
||||
suit_param_ref_t *ref,
|
||||
uint16_t suit_param_ref_to_cbor(const suit_manifest_t *manifest,
|
||||
const suit_param_ref_t *ref,
|
||||
nanocbor_value_t *val);
|
||||
|
||||
/**
|
||||
@ -219,9 +219,9 @@ uint16_t suit_param_ref_to_cbor(suit_manifest_t *manifest,
|
||||
* @param ref reference to parse
|
||||
* @param val NanoCBOR value to restore
|
||||
*/
|
||||
void suit_param_cbor_to_ref(suit_manifest_t *manifest,
|
||||
void suit_param_cbor_to_ref(const suit_manifest_t *manifest,
|
||||
suit_param_ref_t *ref,
|
||||
nanocbor_value_t *val);
|
||||
const nanocbor_value_t *val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ static suit_manifest_handler_t _get_handler(int key,
|
||||
return map[key];
|
||||
}
|
||||
|
||||
uint16_t suit_param_ref_to_cbor(suit_manifest_t *manifest,
|
||||
suit_param_ref_t *ref,
|
||||
uint16_t suit_param_ref_to_cbor(const suit_manifest_t *manifest,
|
||||
const suit_param_ref_t *ref,
|
||||
nanocbor_value_t *val)
|
||||
{
|
||||
size_t len = manifest->len - ref->offset;
|
||||
@ -47,9 +47,9 @@ uint16_t suit_param_ref_to_cbor(suit_manifest_t *manifest,
|
||||
return ref->offset;
|
||||
}
|
||||
|
||||
void suit_param_cbor_to_ref(suit_manifest_t *manifest,
|
||||
void suit_param_cbor_to_ref(const suit_manifest_t *manifest,
|
||||
suit_param_ref_t *ref,
|
||||
nanocbor_value_t *val)
|
||||
const nanocbor_value_t *val)
|
||||
{
|
||||
assert(val->cur >= manifest->buf);
|
||||
ref->offset = val->cur - manifest->buf;
|
||||
|
Loading…
Reference in New Issue
Block a user