diff options
Diffstat (limited to 'nuttx/fs/fs_dup2.c')
-rw-r--r-- | nuttx/fs/fs_dup2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/fs/fs_dup2.c b/nuttx/fs/fs_dup2.c index 45ff2bb73..14171fe47 100644 --- a/nuttx/fs/fs_dup2.c +++ b/nuttx/fs/fs_dup2.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fs_dup2.c * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -73,21 +73,21 @@ * ****************************************************************************/ -int dup2(int fildes1, int fildes2) +int dup2(int fd1, int fd2) { /* Check the range of the descriptor to see if we got a file or a socket * descriptor. */ - if ((unsigned int)fildes1 >= CONFIG_NFILE_DESCRIPTORS) + if ((unsigned int)fd1 >= CONFIG_NFILE_DESCRIPTORS) { /* Not a valid file descriptor. Did we get a valid socket descriptor? */ - if ((unsigned int)fildes1 < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS)) + if ((unsigned int)fd1 < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS)) { /* Yes.. dup the socket descriptor */ - return net_dup2(fildes1, fildes2); + return net_dup2(fd1, fd2); } else { @@ -101,7 +101,7 @@ int dup2(int fildes1, int fildes2) { /* Its a valid file descriptor.. dup the file descriptor */ - return file_dup2(fildes1, fildes2); + return file_dup2(fd1, fd2); } } |