From 937ffaf1e946e1a54f04c4d656516cb86757e491 Mon Sep 17 00:00:00 2001 From: Ken Bannister Date: Fri, 17 Apr 2020 07:05:13 -0400 Subject: [PATCH] examples/gcoap: fix reference to variable out of scope --- examples/gcoap/gcoap_cli.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/gcoap/gcoap_cli.c b/examples/gcoap/gcoap_cli.c index 308d445387..8585825f63 100644 --- a/examples/gcoap/gcoap_cli.c +++ b/examples/gcoap/gcoap_cli.c @@ -279,14 +279,13 @@ static bool _parse_endpoint(sock_udp_ep_t *remote, static size_t _send(uint8_t *buf, size_t len, char *addr_str, char *port_str) { size_t bytes_sent; - sock_udp_ep_t *remote; + sock_udp_ep_t new_remote; if (_proxied) { remote = &_proxy_remote; } else { - sock_udp_ep_t new_remote; if (!_parse_endpoint(&new_remote, addr_str, port_str)) { return 0; }