Adding explicit braces
@@ -1213,7 +1213,7 @@ oc_ri_invoke_coap_entity_handler(void *request, void *response, uint8_t *buffer,
!resource_is_collection &&
#endif /* OC_COLLECTIONS */
cur_resource && (method == OC_PUT || method == OC_POST) &&
- response_buffer.code < oc_status_code(OC_STATUS_BAD_REQUEST))
+ response_buffer.code < oc_status_code(OC_STATUS_BAD_REQUEST)) {
if ((iface_mask == OC_IF_STARTUP) ||
(iface_mask == OC_IF_STARTUP_REVERT)) {
oc_resource_defaults_data_t* resource_defaults_data = oc_ri_alloc_resource_defaults();
@@ -1226,6 +1226,7 @@ oc_ri_invoke_coap_entity_handler(void *request, void *response, uint8_t *buffer,
oc_ri_add_timed_event_callback_ticks(
cur_resource, &oc_observe_notification_delayed, 0);
}
+ }
#endif /* OC_SERVER */
if (response_buffer.response_length > 0) {
