提交 87171f00 编写于 作者: B Bernard Xiong

[LIBC] code cleanup

上级 01c3460c
......@@ -91,7 +91,7 @@ FILEHANDLE _sys_open(const char *name, int openmode)
}
fd = open(name, mode, 0);
if(fd < 0)
if (fd < 0)
return -1;
else
return fd + STDERR + 1;
......@@ -138,7 +138,7 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode)
return 0;
#else
size = read(fh - STDERR - 1, buf, len);
if(size >= 0)
if (size >= 0)
return len - size;
else
return -1;
......@@ -174,14 +174,14 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
#endif
}
if(fh == STDIN)
if (fh == STDIN)
return -1;
#ifndef RT_USING_DFS
return 0;
#else
size = write(fh - STDERR - 1, buf, len);
if(size >= 0)
if (size >= 0)
return len - size;
else
return -1;
......@@ -270,6 +270,6 @@ int remove(const char *filename)
int system(const char *string)
{
RT_ASSERT(0);
for(;;);
for (;;);
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册