From 5b26068635f14e3221645a046c2c63f7df6f0a14 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Mon, 26 Apr 2021 15:05:42 -0300 Subject: [PATCH] system/spi: Fix NxStyle issues --- system/spi/spi_exch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/spi/spi_exch.c b/system/spi/spi_exch.c index 3616d6f7e..2f6914180 100644 --- a/system/spi/spi_exch.c +++ b/system/spi/spi_exch.c @@ -71,10 +71,12 @@ int spicmd_exch(FAR struct spitool_s *spitool, int argc, FAR char **argv) { 0 }; + uint8_t rxdata[MAX_XDATA] = { 0 }; + uint8_t *txdatap = txdata; struct spi_trans_s trans; struct spi_sequence_s seq; @@ -111,7 +113,6 @@ int spicmd_exch(FAR struct spitool_s *spitool, int argc, FAR char **argv) return ERROR; } - while (argndx < argc) { FAR uint8_t *a = (uint8_t *)argv[argndx]; @@ -119,7 +120,7 @@ int spicmd_exch(FAR struct spitool_s *spitool, int argc, FAR char **argv) { if ((*(a + 1) == 0) || !ISHEX(*a) || !ISHEX(*(a + 1))) { - /* Uneven number of characters or illegal char .... that's an error */ + /* Uneven number of characters or illegal character error */ spitool_printf(spitool, g_spiincompleteparam, argv[0]); return ERROR;