From da31673ddfdab1a634093265c0e6b8c4da55e99d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 21 Mar 2020 11:31:48 -0600 Subject: [PATCH] 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 eab88f651..e0900de9d 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 421fab0e3..2169ce988 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 0436a8bb7..f4cf73b2e 100644 --- a/graphics/nxwm/src/nxwm_main.cxx +++ b/graphics/nxwm/src/nxwm_main.cxx @@ -46,7 +46,7 @@ #include #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 f592010cc..16c2387fa 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 29bb984ea..296e91723 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 a2363ad0c..f57a666f8 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]);