summaryrefslogtreecommitdiff
path: root/nuttx/libc/string
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/libc/string')
-rw-r--r--nuttx/libc/string/lib_strncpy.c6
1 files changed, 5 insertions, 1 deletions
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