mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-19 14:09:05 +03:00
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:
1 parent
d9cb9c826c
commit
53183e63b2
1 file changed
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user