diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-02 13:59:47 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-02 13:59:47 -0600 |
commit | 8f7b45e9e8e348fbba2d758fab3e0720790bc970 (patch) | |
tree | 3864b90bde44061d2b8df9c0590edd2052af03d5 | |
parent | 13e397a02a5333a37fc3fba4715ef80725a9064a (diff) | |
download | px4-nuttx-8f7b45e9e8e348fbba2d758fab3e0720790bc970.tar.gz px4-nuttx-8f7b45e9e8e348fbba2d758fab3e0720790bc970.tar.bz2 px4-nuttx-8f7b45e9e8e348fbba2d758fab3e0720790bc970.zip |
Cosmetic changes
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_serial.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/serial/serial.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_serial.c b/nuttx/arch/arm/src/tiva/tiva_serial.c index 161bd0da3..a84e71763 100644 --- a/nuttx/arch/arm/src/tiva/tiva_serial.c +++ b/nuttx/arch/arm/src/tiva/tiva_serial.c @@ -1289,7 +1289,7 @@ void up_earlyserialinit(void) up_disableuartint(TTYS7_DEV.priv, NULL); #endif - /* Configuration whichever one is the console */ + /* Configure whichever one is the console */ #ifdef HAVE_SERIAL_CONSOLE CONSOLE_DEV.isconsole = true; diff --git a/nuttx/drivers/serial/serial.c b/nuttx/drivers/serial/serial.c index 001428900..b2719e62a 100644 --- a/nuttx/drivers/serial/serial.c +++ b/nuttx/drivers/serial/serial.c @@ -421,18 +421,18 @@ static ssize_t uart_write(FAR struct file *filep, FAR const char *buffer, #ifdef CONFIG_SERIAL_TERMIOS /* Do output post-processing */ - if (dev->tc_oflag & OPOST) + if ((dev->tc_oflag & OPOST) != 0) { /* Mapping CR to NL? */ - if ((ch == '\r') && (dev->tc_oflag & OCRNL)) + if ((ch == '\r') && (dev->tc_oflag & OCRNL) != 0) { ch = '\n'; } /* Are we interested in newline processing? */ - if ((ch == '\n') && (dev->tc_oflag & (ONLCR | ONLRET))) + if ((ch == '\n') && (dev->tc_oflag & (ONLCR | ONLRET)) != 0) { ret = uart_putxmitchar(dev, '\r', oktoblock); if (ret < 0) @@ -898,7 +898,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { case TCGETS: { - struct termios *termiosp = (struct termios*)arg; + FAR struct termios *termiosp = (struct termios*)arg; if (!termiosp) { @@ -916,7 +916,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case TCSETS: { - struct termios *termiosp = (struct termios*)arg; + FAR struct termios *termiosp = (struct termios*)arg; if (!termiosp) { @@ -1269,7 +1269,7 @@ static int uart_open(FAR struct file *filep) #ifdef CONFIG_SERIAL_TERMIOS dev->tc_iflag = 0; - if (dev->isconsole == true) + if (dev->isconsole) { /* Enable \n -> \r\n translation for the console */ |