net: lwm2m: Fix build warning on access-control object

With bootstrap one function is unused. Fix by changing
ifdef to if (IS_ENABLED()) so linker can drop it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This commit is contained in:
Seppo Takalo 2023-09-20 10:08:50 +03:00 committed by Carles Cufí
commit d8d81a8075

View file

@ -432,10 +432,10 @@ static int ac_control_init(void)
ac_obj.create_cb = ac_create;
lwm2m_register_obj(&ac_obj);
#if !IS_ENABLED(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP)
/* add the objects/object instances that were created before the ac control object */
if (!IS_ENABLED(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP)) {
/* add the objects/object instances that were created before the ac control */
add_existing_objects();
#endif /* CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP */
}
return 0;
}