summaryrefslogtreecommitdiff
path: root/nuttx/lib
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-02 20:45:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-02 20:45:35 +0000
commit944bf89644559cd2ae021122451ff5d0a740cb85 (patch)
treee60ca1e429abad6bee12af28d65c0f72f795c9c4 /nuttx/lib
parent146ccad3863879e9acc928cc2b2087cb45abe4d9 (diff)
downloadpx4-nuttx-944bf89644559cd2ae021122451ff5d0a740cb85.tar.gz
px4-nuttx-944bf89644559cd2ae021122451ff5d0a740cb85.tar.bz2
px4-nuttx-944bf89644559cd2ae021122451ff5d0a740cb85.zip
More FTP client fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3661 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r--nuttx/lib/stdio/lib_fgetc.c9
-rw-r--r--nuttx/lib/stdio/lib_gets.c2
2 files changed, 7 insertions, 4 deletions
diff --git a/nuttx/lib/stdio/lib_fgetc.c b/nuttx/lib/stdio/lib_fgetc.c
index 58a199724..4e521e840 100644
--- a/nuttx/lib/stdio/lib_fgetc.c
+++ b/nuttx/lib/stdio/lib_fgetc.c
@@ -86,10 +86,13 @@
int fgetc(FAR FILE *stream)
{
- unsigned char c;
- if (lib_fread(&c, 1, stream) > 0)
+ unsigned char ch;
+ ssize_t ret;
+
+ ret = lib_fread(&ch, 1, stream);
+ if (ret > 0)
{
- return c;
+ return ch;
}
else
{
diff --git a/nuttx/lib/stdio/lib_gets.c b/nuttx/lib/stdio/lib_gets.c
index 33ae48aaa..20b2906df 100644
--- a/nuttx/lib/stdio/lib_gets.c
+++ b/nuttx/lib/stdio/lib_gets.c
@@ -99,7 +99,7 @@
FAR char *gets(FAR char *s)
{
/* gets is ALMOST the same as fgets using stdin and no
- * lenght limit (hence, the unsafeness of gets). So let
+ * length limit (hence, the unsafeness of gets). So let
* fgets do most of the work.
*/