mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
libc/netdb: Need skip ':' to get port in dns_foreach_nameserver
Change-Id: Ic9555832c4404a59e1117dce06a5de13f0cc4141 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -166,7 +166,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg)
|
||||
|
||||
/* Get the port number following the right bracket */
|
||||
|
||||
if (*ptr == ':')
|
||||
if (*ptr++ == ':')
|
||||
{
|
||||
FAR char *portstr;
|
||||
int tmp;
|
||||
@@ -174,7 +174,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg)
|
||||
/* Isolate the port string */
|
||||
|
||||
portstr = ptr;
|
||||
ptr = find_spaces(addrstr);
|
||||
ptr = find_spaces(ptr);
|
||||
*ptr = '\0';
|
||||
|
||||
/* Get the port number */
|
||||
|
||||
Reference in New Issue
Block a user