nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiaoxi...@apache.org
Subject [incubator-nuttx-apps] 02/02: Run nxstyle against all modified .c and .h files
Date Sun, 22 Mar 2020 13:23:41 GMT
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-apps.git

commit da31673ddfdab1a634093265c0e6b8c4da55e99d
Author: Gregory Nutt <gnutt@nuttx.org>
AuthorDate: Sat Mar 21 11:31:48 2020 -0600

    Run nxstyle against all modified .c and .h files
---
 examples/mount/mount.h          |  1 -
 fsutils/passwd/passwd.h         |  5 +++--
 graphics/nxwm/src/nxwm_main.cxx |  2 +-
 nshlib/nsh.h                    | 15 +++++++++------
 nshlib/nsh_fscmds.c             | 11 ++++++-----
 nshlib/nsh_mntcmds.c            |  8 ++++----
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/examples/mount/mount.h b/examples/mount/mount.h
index eab88f6..e0900de 100644
--- a/examples/mount/mount.h
+++ b/examples/mount/mount.h
@@ -56,7 +56,6 @@
 #  define MOUNT_DEVNAME      MKMOUNT_DEVNAME(CONFIG_EXAMPLES_MOUNT_RAMDEVNO)
 #endif
 
-
 /****************************************************************************
  * Public Types
  ****************************************************************************/
diff --git a/fsutils/passwd/passwd.h b/fsutils/passwd/passwd.h
index 421fab0..2169ce9 100644
--- a/fsutils/passwd/passwd.h
+++ b/fsutils/passwd/passwd.h
@@ -47,7 +47,7 @@
 #define MAX_PASSWORD  (3 * MAX_ENCRYPTED / 4)
 
 /****************************************************************************
- * Private Types
+ * Public Types
  ****************************************************************************/
 
 struct passwd_s
@@ -103,7 +103,8 @@ void passwd_unlock(FAR sem_t *sem);
  *
  ****************************************************************************/
 
-int passwd_encrypt(FAR const char *password, char encrypted[MAX_ENCRYPTED + 1]);
+int passwd_encrypt(FAR const char *password,
+                   char encrypted[MAX_ENCRYPTED + 1]);
 
 /****************************************************************************
  * Name: passwd_append
diff --git a/graphics/nxwm/src/nxwm_main.cxx b/graphics/nxwm/src/nxwm_main.cxx
index 0436a8b..f4cf73b 100644
--- a/graphics/nxwm/src/nxwm_main.cxx
+++ b/graphics/nxwm/src/nxwm_main.cxx
@@ -46,7 +46,7 @@
 #include <sys/boardctl.h>
 
 #ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA
-#  include "platform/configdata.hr"
+#  include "platform/configdata.h"
 #endif
 
 #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
diff --git a/nshlib/nsh.h b/nshlib/nsh.h
index f592010..16c2387 100644
--- a/nshlib/nsh.h
+++ b/nshlib/nsh.h
@@ -44,7 +44,9 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
+
 /* The background commands require pthread support */
 
 #ifdef CONFIG_DISABLE_PTHREAD
@@ -138,8 +140,8 @@
 #  error "No NSH front end defined"
 #endif
 
-/* If a USB device is selected for the NSH console then we need to handle some
- * special start-up conditions.
+/* If a USB device is selected for the NSH console then we need to handle
+ * some special start-up conditions.
  */
 
 #undef HAVE_USB_CONSOLE
@@ -429,8 +431,8 @@
 #endif
 
 /* strerror() produces much nicer output but is, however, quite large and
- * will only be used if CONFIG_NSH_STRERROR is defined.  Note that the strerror
- * interface must also have been enabled with CONFIG_LIBC_STRERROR.
+ * will only be used if CONFIG_NSH_STRERROR is defined.  Note that the
+ * strerror interface must also have been enabled with CONFIG_LIBC_STRERROR.
  */
 
 #ifndef CONFIG_LIBC_STRERROR
@@ -823,7 +825,8 @@ int nsh_usbconsole(void);
 #endif
 
 #if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)
-int nsh_script(FAR struct nsh_vtbl_s *vtbl, const char *cmd, const char *path);
+int nsh_script(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
+               FAR const char *path);
 #ifdef CONFIG_NSH_ROMFSETC
 int nsh_initscript(FAR struct nsh_vtbl_s *vtbl);
 #ifdef CONFIG_NSH_ROMFSRC
@@ -1151,7 +1154,7 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
 #endif
 
 #if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN)
-   int cmd_rptun(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
+  int cmd_rptun(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
 #endif
 
 #if (defined(CONFIG_BOARDCTL_POWEROFF) || defined(CONFIG_BOARDCTL_RESET)) && \
diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c
index 29bb984..296e917 100644
--- a/nshlib/nsh_fscmds.c
+++ b/nshlib/nsh_fscmds.c
@@ -608,7 +608,8 @@ int cmd_cp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
                 {
                   /* Read error */
 
-                  nsh_error(vtbl, g_fmtcmdfailed, argv[0], "read", NSH_ERRNO);
+                  nsh_error(vtbl, g_fmtcmdfailed, argv[0], "read",
+                            NSH_ERRNO);
                 }
 
               goto errout_with_wrfd;
@@ -795,7 +796,7 @@ int cmd_losetup(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
       setup.filename = filepath;  /* The file or character device to use */
       setup.sectsize = 512;       /* The sector size to use with the block device */
       setup.offset   = offset;    /* An offset that may be applied to the device */
-      setup.readonly = readonly;    /* True: Read access will be supported only */
+      setup.readonly = readonly;  /* True: Read access will be supported only */
 
       ret = ioctl(fd, LOOPIOC_SETUP, (unsigned long)((uintptr_t)&setup));
       if (ret < 0)
@@ -1420,7 +1421,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
   desc.minor    = minor;         /* Minor device number of the RAM disk. */
   desc.nsectors = nsectors;      /* The number of sectors in the RAM disk. */
   desc.sectsize = sectsize;      /* The size of one sector in bytes. */
-  desc.rdflags  = RDFLAG_WRENABLED | RDFLAG_FUNLINK;  /* See ramdisk.h. */
+  desc.rdflags  = RDFLAG_WRENABLED | RDFLAG_FUNLINK;
 
   ret = boardctl(BOARDIOC_MKRD, (uintptr_t)&desc);
   if (ret < 0)
@@ -1852,8 +1853,8 @@ int cmd_truncate(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
           else
             {
               /* We successfully performed the create and now have a zero-
-               * length file.  Perform the truncation to extend the allocation
-               * (unless we really wanted a zero-length file).
+               * length file.  Perform the truncation to extend the
+               * allocation (unless we really wanted a zero-length file).
                */
 
               ret = OK;
diff --git a/nshlib/nsh_mntcmds.c b/nshlib/nsh_mntcmds.c
index a2363ad..f57a666 100644
--- a/nshlib/nsh_mntcmds.c
+++ b/nshlib/nsh_mntcmds.c
@@ -244,8 +244,8 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
   FAR char *rpath;
   int ret;
 
-  /* The fist argument on the command line should be the NFS server IP address
-   * in standard IPv4 (or IPv6) dot format.
+  /* The fist argument on the command line should be the NFS server IP
+   * address in standard IPv4 (or IPv6) dot format.
    */
 
   address = argv[1];
@@ -330,8 +330,8 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
   data.path               = rpath;
   data.flags              = 0;       /* 0=Use all defaults */
 
-  /* The local mount point path (lpath) might be relative to the current working
-   * directory.
+  /* The local mount point path (lpath) might be relative to the current
+   * working directory.
    */
 
   lpath = nsh_getfullpath(vtbl, argv[2]);


Mime
View raw message