diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-28 16:50:07 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-28 16:50:07 -0600 |
commit | 4c24c7c4a741eaeffc76339f07076cdad7a36c56 (patch) | |
tree | 337a94000f0e849884e81e8ac2ee188bf0a38179 /nuttx/libc/stdio/lib_fclose.c | |
parent | e735773fe5ea269b43dbecb246cec846b3a0368e (diff) | |
download | px4-nuttx-4c24c7c4a741eaeffc76339f07076cdad7a36c56.tar.gz px4-nuttx-4c24c7c4a741eaeffc76339f07076cdad7a36c56.tar.bz2 px4-nuttx-4c24c7c4a741eaeffc76339f07076cdad7a36c56.zip |
Clean up some naming: fd vs. fildes vs. filedes and filep vs filp
Diffstat (limited to 'nuttx/libc/stdio/lib_fclose.c')
-rw-r--r-- | nuttx/libc/stdio/lib_fclose.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/nuttx/libc/stdio/lib_fclose.c b/nuttx/libc/stdio/lib_fclose.c index c04537adf..50e7e63bc 100644 --- a/nuttx/libc/stdio/lib_fclose.c +++ b/nuttx/libc/stdio/lib_fclose.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/stdio/lib_fclose.c * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011, 3013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -80,9 +80,9 @@ int fclose(FAR FILE *stream) /* Check that the underlying file descriptor corresponds to an an open * file. */ - + ret = OK; - if (stream->fs_filedes >= 0) + if (stream->fs_fd >= 0) { /* If the stream was opened for writing, then flush the stream */ @@ -94,7 +94,7 @@ int fclose(FAR FILE *stream) /* Close the underlying file descriptor and save the return status */ - status = close(stream->fs_filedes); + status = close(stream->fs_fd); /* If close() returns an error but flush() did not then make sure * that we return the close() error condition. @@ -132,9 +132,9 @@ int fclose(FAR FILE *stream) stream->fs_oflags = 0; #endif - /* Setting the fs_filedescriptor to -1 makes the stream available for reuse */ + /* Setting the file descriptor to -1 makes the stream available for reuse */ - stream->fs_filedes = -1; + stream->fs_fd = -1; } /* On an error, reset the errno to the first error encountered and return @@ -151,4 +151,3 @@ int fclose(FAR FILE *stream) return OK; } - |