Fix wrong parameter size
Type int expects 4 bytes for function write(). Type char expects 1 byte which matches the real usage of function write(). Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
This commit is contained in:
parent
53878a53db
commit
fece67ee4b
@ -446,13 +446,16 @@ int main(int argc, FAR char *argv[])
|
||||
|
||||
while (!cu->force_exit)
|
||||
{
|
||||
int ch = getc(stdin);
|
||||
char ch;
|
||||
int c = getc(stdin);
|
||||
|
||||
if (ch < 0)
|
||||
if (c < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ch = c;
|
||||
|
||||
if (nobreak == 1)
|
||||
{
|
||||
write(cu->outfd, &ch, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user