Skip to content

Commit

Permalink
Merge pull request #20157 from maribu/sys/net/gnrc_sock/assume_timeout
Browse files Browse the repository at this point in the history
sys/net/gnrc_sock: assume timeout is feasible
  • Loading branch information
benpicco authored Dec 6, 2023
2 parents 33727c4 + d160a78 commit eea7820
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sys/net/gnrc/sock/gnrc_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
#include <errno.h>
#include <stdlib.h>

#include "compiler_hints.h"
#include "log.h"
#include "net/af.h"
#include "net/ipv6/hdr.h"
#include "net/gnrc/ipv6.h"
#include "net/gnrc/ipv6/hdr.h"
#include "net/gnrc/netreg.h"
#include "net/gnrc/tx_sync.h"
#include "net/ipv6/hdr.h"
#include "net/udp.h"
#include "utlist.h"
#if IS_USED(MODULE_ZTIMER_USEC)
Expand Down Expand Up @@ -140,6 +141,8 @@ ssize_t gnrc_sock_recv(gnrc_sock_reg_t *reg, gnrc_pktsnip_t **pkt_out,
timeout_timer.arg = reg;
xtimer_set(&timeout_timer, timeout);
}
#else
assume((timeout == SOCK_NO_TIMEOUT) || (timeout == 0));
#endif
if (timeout != 0) {
#if defined(DEVELHELP) && IS_ACTIVE(SOCK_HAS_ASYNC)
Expand Down

0 comments on commit eea7820

Please sign in to comment.