diff --git a/libs/libc/wchar/lib_swprintf.c b/libs/libc/wchar/lib_swprintf.c index a014831821..5bf5ad5848 100644 --- a/libs/libc/wchar/lib_swprintf.c +++ b/libs/libc/wchar/lib_swprintf.c @@ -51,7 +51,7 @@ int swprintf(FAR wchar_t *buf, size_t maxlen, FAR const wchar_t *fmt, ...) /* Initialize a memory stream to write to the buffer */ lib_memoutstream((FAR struct lib_memoutstream_s *)&memoutstream, - (FAR char *) buf, LIB_BUFLEN_UNKNOWN); + (FAR char *)buf, maxlen); /* Then let lib_vsprintf do the real work */ diff --git a/libs/libc/wchar/lib_wmemchr.c b/libs/libc/wchar/lib_wmemchr.c index 38c9747750..0166169770 100644 --- a/libs/libc/wchar/lib_wmemchr.c +++ b/libs/libc/wchar/lib_wmemchr.c @@ -63,7 +63,7 @@ FAR wchar_t *wmemchr(FAR const wchar_t *s, wchar_t c, size_t n) { /* LINTED const castaway */ - return (FAR wchar_t *) s; + return (FAR wchar_t *)s; } s++; diff --git a/libs/libc/wchar/lib_wmemcpy.c b/libs/libc/wchar/lib_wmemcpy.c index 7e93491992..a1fcfebc28 100644 --- a/libs/libc/wchar/lib_wmemcpy.c +++ b/libs/libc/wchar/lib_wmemcpy.c @@ -55,6 +55,6 @@ FAR wchar_t *wmemcpy(FAR wchar_t *d, FAR const wchar_t *s, size_t n) { - return (FAR wchar_t *) memcpy(d, s, n * sizeof(wchar_t)); + return (FAR wchar_t *)memcpy(d, s, n * sizeof(wchar_t)); } #endif diff --git a/libs/libc/wchar/lib_wmemmove.c b/libs/libc/wchar/lib_wmemmove.c index 4b97732e19..5992153e17 100644 --- a/libs/libc/wchar/lib_wmemmove.c +++ b/libs/libc/wchar/lib_wmemmove.c @@ -54,6 +54,6 @@ FAR wchar_t *wmemmove(FAR wchar_t *d, FAR const wchar_t *s, size_t n) { - return (FAR wchar_t *) memmove(d, s, n * sizeof(wchar_t)); + return (FAR wchar_t *)memmove(d, s, n * sizeof(wchar_t)); } #endif diff --git a/libs/libc/wchar/lib_wmemset.c b/libs/libc/wchar/lib_wmemset.c index 2a44d359f1..8148dba03d 100644 --- a/libs/libc/wchar/lib_wmemset.c +++ b/libs/libc/wchar/lib_wmemset.c @@ -57,7 +57,7 @@ FAR wchar_t *wmemset(FAR wchar_t *s, wchar_t c, size_t n) FAR wchar_t *p; size_t i; - p = (FAR wchar_t *) s; + p = (FAR wchar_t *)s; for (i = 0; i < n; i++) { *p = c;