summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorJasonJiaJie <[email protected]>2017-11-15 13:17:42 +0800
committerJasonJiaJie <[email protected]>2017-11-15 13:17:42 +0800
commitb085bba04c41b82543e213a67042736f73600dbb (patch)
treea0383e8dc981838427fc84d911bdf4fec82e586f /components
parent9f745c6aafd8c3fcf300dfebe87bedafb8bb2887 (diff)
[Posix]termios parameter issue.
Diffstat (limited to 'components')
-rw-r--r--components/drivers/serial/serial.c2
-rw-r--r--components/libc/termios/posix_termios.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index a5d90b9b99..149cfaff3e 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -1024,7 +1024,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev,
break;
case TCFLSH:
{
- int queue = *(int *)args;
+ int queue = (int)args;
_serial_flush(serial, queue);
}
diff --git a/components/libc/termios/posix_termios.c b/components/libc/termios/posix_termios.c
index 72afa8188d..4ec513ef1d 100644
--- a/components/libc/termios/posix_termios.c
+++ b/components/libc/termios/posix_termios.c
@@ -111,12 +111,12 @@ int tcsendbreak(int fd, int dur)
int tcflush(int fd, int queue)
{
- return ioctl(fd, TCFLSH, (void*)&queue);
+ return ioctl(fd, TCFLSH, (void*)queue);
}
int tcflow(int fd, int action)
{
- return ioctl(fd, TCXONC, (void*)&action);
+ return ioctl(fd, TCXONC, (void*)action);
}
/**