You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 13:12:06 UTC

[incubator-nuttx] 29/35: fs/nfs/nfs_util.c: Fix syslog formats

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

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

commit 73dd8a1ba209abd597505767a0a95820d26e27d0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:53:58 2020 +0900

    fs/nfs/nfs_util.c: Fix syslog formats
    
    The following nxstyle error is a false positive.
    https://github.com/apache/incubator-nuttx/issues/387
    
    fs/nfs/nfs_util.c:70:39: error: C++ style comment
---
 fs/nfs/nfs_util.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs_util.c b/fs/nfs/nfs_util.c
index c0de0c3..452d36c 100644
--- a/fs/nfs/nfs_util.c
+++ b/fs/nfs/nfs_util.c
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -85,7 +86,7 @@ static inline int nfs_pathsegment(FAR const char **path, FAR char *buffer,
         }
       else if (nbytes >= NAME_MAX)
         {
-          ferr("ERROR: File name segment is too long: %d\n", *path);
+          ferr("ERROR: File name segment is too long: %d\n", nbytes);
           return -EFBIG;
         }
       else
@@ -236,7 +237,7 @@ int nfs_lookup(FAR struct nfsmount *nmp, FAR const char *filename,
   value = fxdr_unsigned(uint32_t, value);
   if (value > NFSX_V3FHMAX)
     {
-      ferr("ERROR: Bad file handle length: %d\n", value);
+      ferr("ERROR: Bad file handle length: %" PRId32 "\n", value);
       return -EIO;
     }