diff options
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/arm/src/tiva/tiva_i2c.c | 2 | ||||
-rw-r--r-- | nuttx/libc/string/lib_strncpy.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/tiva/tiva_i2c.c b/nuttx/arch/arm/src/tiva/tiva_i2c.c index e64850b3e..9e538d60c 100644 --- a/nuttx/arch/arm/src/tiva/tiva_i2c.c +++ b/nuttx/arch/arm/src/tiva/tiva_i2c.c @@ -1028,7 +1028,7 @@ static void tiva_i2c_nextxfr(struct tiva_i2c_priv_s *priv, uint32_t cmd) */ cmd |= I2CM_CS_RUN; - if (priv->msgc < 2 && priv->dcnt < 2) + if (/* priv->msgc < 2 && */ priv->dcnt < 2) { /* This is the last byte of the last message... add the STOP bit */ diff --git a/nuttx/libc/string/lib_strncpy.c b/nuttx/libc/string/lib_strncpy.c index bba16a0a3..095111c94 100644 --- a/nuttx/libc/string/lib_strncpy.c +++ b/nuttx/libc/string/lib_strncpy.c @@ -56,7 +56,11 @@ char *strncpy(FAR char *dest, FAR const char *src, size_t n) char *end = dest + n; /* End of dest buffer + 1 byte */ while ((dest != end) && (*dest++ = *src++) != '\0'); - while (dest != end) *dest++ = '\0'; + while (dest != end) + { + *dest++ = '\0'; + } + return ret; } #endif |