More FTP client fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3661 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
10e27f6179
commit
134a1a930e
|
@ -86,10 +86,13 @@
|
||||||
|
|
||||||
int fgetc(FAR FILE *stream)
|
int fgetc(FAR FILE *stream)
|
||||||
{
|
{
|
||||||
unsigned char c;
|
unsigned char ch;
|
||||||
if (lib_fread(&c, 1, stream) > 0)
|
ssize_t ret;
|
||||||
|
|
||||||
|
ret = lib_fread(&ch, 1, stream);
|
||||||
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
return c;
|
return ch;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
FAR char *gets(FAR char *s)
|
FAR char *gets(FAR char *s)
|
||||||
{
|
{
|
||||||
/* gets is ALMOST the same as fgets using stdin and no
|
/* 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.
|
* fgets do most of the work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue