mirror of
https://github.com/apache/nuttx.git
synced 2026-08-04 22:00:21 +00: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:
parent
35b98f2361
commit
673a43d5fa
1 changed files with 2 additions and 2 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue