Skip to content

Commit

Permalink
libs/libc/netdb: Remove another use of the restrict keyword.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Jun 13, 2018
1 parent c213bac commit fd43981
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions libs/libc/netdb/lib_getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ FAR static struct ai_s *alloc_ai(int family, int port, FAR void *addr)
* Name: getaddrinfo
****************************************************************************/

int getaddrinfo(FAR const char *restrict hostname,
FAR const char *restrict servname,
FAR const struct addrinfo *restrict hint,
FAR struct addrinfo **restrict res)
int getaddrinfo(FAR const char *hostname, FAR const char *servname,
FAR const struct addrinfo *hint, FAR struct addrinfo **res)
{
int family = AF_UNSPEC;
int port = 0;
Expand All @@ -137,9 +135,9 @@ int getaddrinfo(FAR const char *restrict hostname,

if (hint)
{
family = hint->ai_family;
flags = hint->ai_flags;
proto = hint->ai_protocol;
family = hint->ai_family;
flags = hint->ai_flags;
proto = hint->ai_protocol;
socktype = hint->ai_socktype;

if ((flags & valid_flags) != flags)
Expand Down Expand Up @@ -308,4 +306,3 @@ int getaddrinfo(FAR const char *restrict hostname,

return EAI_AGAIN;
}

0 comments on commit fd43981

Please sign in to comment.