You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2022/05/30 22:59:40 UTC

[incubator-nuttx] branch master updated: libc/wchar: Fix the minor style issue

This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 88fd6210f6 libc/wchar: Fix the minor style issue
88fd6210f6 is described below

commit 88fd6210f6468ebbe54f42f48ee38590bbdee54e
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon May 30 08:31:07 2022 +0800

    libc/wchar: Fix the minor style issue
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 libs/libc/wchar/lib_swprintf.c | 2 +-
 libs/libc/wchar/lib_wmemchr.c  | 2 +-
 libs/libc/wchar/lib_wmemcpy.c  | 2 +-
 libs/libc/wchar/lib_wmemmove.c | 2 +-
 libs/libc/wchar/lib_wmemset.c  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

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;