net: lwm2m: Deprecate lwm2m_get/set_u64
Deprecate lwm2m_set_u64() and lwm2m_get_u64 as only LWM2M_RES_TYPE_S64 exist. Unsigned variant is not defined. Technically these might have worked OK, but it is undefined what happens to large unsigned values when those are converted to various payload formats (like CBOR) that might decode numbers differently depending of their signedness. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This commit is contained in:
parent
f68fbd6984
commit
071cad2e76
4 changed files with 12 additions and 22 deletions
|
@ -203,16 +203,6 @@ ZTEST(lwm2m_registry, test_get_set)
|
|||
zassert_equal(strlen(buf), 0);
|
||||
}
|
||||
|
||||
ZTEST(lwm2m_registry, test_missing_u64)
|
||||
{
|
||||
/* This data type is missing, so use S64 resource instead */
|
||||
uint64_t u64 = 123;
|
||||
|
||||
zassert_equal(lwm2m_set_u64(&LWM2M_OBJ(32768, 0, LWM2M_RES_TYPE_S64), u64), 0);
|
||||
zassert_equal(lwm2m_get_u64(&LWM2M_OBJ(32768, 0, LWM2M_RES_TYPE_S64), &u64), 0);
|
||||
zassert_equal(u64, 123);
|
||||
}
|
||||
|
||||
ZTEST(lwm2m_registry, test_temp_sensor)
|
||||
{
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue