diff options
Diffstat (limited to 'nuttx/libc/stdio/lib_ungetc.c')
-rw-r--r-- | nuttx/libc/stdio/lib_ungetc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/libc/stdio/lib_ungetc.c b/nuttx/libc/stdio/lib_ungetc.c index 178aeddd1..9d14499d7 100644 --- a/nuttx/libc/stdio/lib_ungetc.c +++ b/nuttx/libc/stdio/lib_ungetc.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/stdio/lib_ungetc.c * - * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -96,7 +96,7 @@ int ungetc(int c, FAR FILE *stream) /* Stream must be open for read access */ - if ((stream && stream->fs_filedes < 0) || + if ((stream && stream->fs_fd < 0) || ((stream->fs_oflags & O_RDOK) == 0)) { set_errno(EBADF); |