diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-03-12 08:11:08 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-03-12 08:11:08 -0600 |
commit | 838f9ac3ea96ac4e417cd9faeb95d71b6a109ebc (patch) | |
tree | 18ff1a69761518e5ddcd722af32e0f0b8078fbd4 /nuttx/net | |
parent | a4b3285de1f7e9b8129c5faaf8b50df8712179ed (diff) | |
download | px4-nuttx-838f9ac3ea96ac4e417cd9faeb95d71b6a109ebc.tar.gz px4-nuttx-838f9ac3ea96ac4e417cd9faeb95d71b6a109ebc.tar.bz2 px4-nuttx-838f9ac3ea96ac4e417cd9faeb95d71b6a109ebc.zip |
socket: net_dupsd: Do not call sockfd_socket() twice. From Juha Niskanen
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/socket/net_dupsd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/net/socket/net_dupsd.c b/nuttx/net/socket/net_dupsd.c index 480b68f37..0af6fce57 100644 --- a/nuttx/net/socket/net_dupsd.c +++ b/nuttx/net/socket/net_dupsd.c @@ -60,7 +60,7 @@ * Function: net_dupsd * * Description: - * Clone a socket descriptor to an arbitray descriptor number. If file + * Clone a socket descriptor to an arbitrary descriptor number. If file * descriptors are implemented, then this is called by dup() for the case * of socket file descriptors. If file descriptors are not implemented, * then this function IS dup(). @@ -69,14 +69,14 @@ int net_dupsd(int sockfd, int minsd) { - FAR struct socket *psock1 = sockfd_socket(sockfd); + FAR struct socket *psock1; FAR struct socket *psock2; int sockfd2; int err; int ret; /* Make sure that the minimum socket descriptor is within the legal range. - * the minimum value we receive is relative to file descriptor 0; we need + * The minimum value we receive is relative to file descriptor 0; we need * map it relative of the first socket descriptor. */ |