From f2675bf333e0378c842717a94a13c73dabb76a52 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 15 Jun 2009 18:58:22 +0000 Subject: dup() and dup2() support for socket descriptors git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1884 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/lib/lib_stdinstream.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'nuttx/lib') diff --git a/nuttx/lib/lib_stdinstream.c b/nuttx/lib/lib_stdinstream.c index 182696ead..4f99e4439 100644 --- a/nuttx/lib/lib_stdinstream.c +++ b/nuttx/lib/lib_stdinstream.c @@ -50,17 +50,16 @@ static int stdinstream_getc(FAR struct lib_instream_s *this) { FAR struct lib_stdinstream_s *sthis = (FAR struct lib_stdinstream_s *)this; - int ret; - if (this) { - ret = getc(sthis->stream); + int ret = getc(sthis->stream); if (ret != EOF) { this->nget++; } + return ret; } - return ret; + return EOF; } /**************************************************************************** -- cgit v1.2.3