coap-server.c: discard result of coap_get_data()

coap_get_data() sets the given result parameter size to 0 if no
data is available. The function's result therefore can be neglected
in hnd_put_time().
This commit is contained in:
Olaf Bergmann committed 2016-12-02 13:35:32 +01:00
1 parent d9cb9c826c
commit 53183e63b2
1 file changed
+2 -1
+2 -1
View File
@@ -178,7 +178,8 @@ hnd_put_time(coap_context_t *ctx UNUSED_PARAM,
resource->dirty = 1;
coap_get_data(request, &size, &data);
/* coap_get_data() sets size to 0 on error */
(void)coap_get_data(request, &size, &data);
if (size == 0) /* re-init */
my_clock_base = clock_offset;