From eb79a575f66a40bb32ec5b8563e5c2439364483a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 10 Oct 2017 14:24:13 -0600 Subject: [PATCH] Fix a few places where there was a semicolon following the 'if' condition, makeing the following logic unconditional. --- arch/arm/src/imx6/imx_ecspi.c | 4 ++-- arch/avr/src/at90usb/at90usb_usbdev.c | 5 +++-- crypto/testmngr.c | 6 +++++- drivers/usbdev/cdcacm.c | 2 +- sched/mqueue/mq_send.c | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/src/imx6/imx_ecspi.c b/arch/arm/src/imx6/imx_ecspi.c index dc586cda45..42c8017fc0 100644 --- a/arch/arm/src/imx6/imx_ecspi.c +++ b/arch/arm/src/imx6/imx_ecspi.c @@ -1058,7 +1058,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid) DEBUGASSERT(priv != NULL); - if (priv->status != NULL); + if (priv->status != NULL) { ret = priv->select(dev, devid); } @@ -1099,7 +1099,7 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, DEBUGASSERT(priv != NULL); - if (priv->cmddata != NULL); + if (priv->cmddata != NULL) { ret = priv->cmddata(dev, devid, cmd); } diff --git a/arch/avr/src/at90usb/at90usb_usbdev.c b/arch/avr/src/at90usb/at90usb_usbdev.c index 2d47dd7544..74bf05db15 100644 --- a/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/arch/avr/src/at90usb/at90usb_usbdev.c @@ -2459,7 +2459,7 @@ static int avr_epsubmit(FAR struct usbdev_ep_s *ep, /* If there is something avaible in the fifo now, then go get it */ - if (avr_fifoready(AVR_TIMEOUT_NONE) == OK); + if (avr_fifoready(AVR_TIMEOUT_NONE) == OK) { ret = avr_epOUTqueue(privep); } @@ -2967,4 +2967,5 @@ void avr_pollvbus(void) avr_genvbus(); leave_critical_section(flags); } -#endif \ No newline at end of file +#endif + diff --git a/crypto/testmngr.c b/crypto/testmngr.c index 1554e1e301..0e857b34f3 100644 --- a/crypto/testmngr.c +++ b/crypto/testmngr.c @@ -124,8 +124,12 @@ static int test_aes(void) int crypto_test(void) { #if defined(CONFIG_CRYPTO_AES) - if (test_aes()) return -1; + if (test_aes()) + { + return -1; + } #endif + return OK; } diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 89d58e8687..2fa840f5b1 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -570,7 +570,7 @@ static int cdcacm_recvpacket(FAR struct cdcacm_dev_s *priv, * processing. This allows proper utilization of hardware flow control. */ - if (nexthead == rxbuf->tail); + if (nexthead == rxbuf->tail) { if (cdcuart_rxflowcontrol(&priv->serdev, recv->size, true)) { diff --git a/sched/mqueue/mq_send.c b/sched/mqueue/mq_send.c index e842f70546..516f8b2de7 100644 --- a/sched/mqueue/mq_send.c +++ b/sched/mqueue/mq_send.c @@ -94,7 +94,7 @@ int nxmq_send(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio) */ ret = nxmq_verify_send(mqdes, msg, msglen, prio); - if (ret < 0); + if (ret < 0) { return ret; }