Run nxstyle against all modified .c and .h files

This commit is contained in:
Gregory Nutt 2020-03-21 11:31:48 -06:00 committed by Xiang Xiao
parent 1a9444a68b
commit da31673ddf
6 changed files with 23 additions and 19 deletions

View File

@ -56,7 +56,6 @@
# define MOUNT_DEVNAME MKMOUNT_DEVNAME(CONFIG_EXAMPLES_MOUNT_RAMDEVNO) # define MOUNT_DEVNAME MKMOUNT_DEVNAME(CONFIG_EXAMPLES_MOUNT_RAMDEVNO)
#endif #endif
/**************************************************************************** /****************************************************************************
* Public Types * Public Types
****************************************************************************/ ****************************************************************************/

View File

@ -47,7 +47,7 @@
#define MAX_PASSWORD (3 * MAX_ENCRYPTED / 4) #define MAX_PASSWORD (3 * MAX_ENCRYPTED / 4)
/**************************************************************************** /****************************************************************************
* Private Types * Public Types
****************************************************************************/ ****************************************************************************/
struct passwd_s 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 * Name: passwd_append

View File

@ -46,7 +46,7 @@
#include <sys/boardctl.h> #include <sys/boardctl.h>
#ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA #ifdef CONFIG_NXWM_TOUCHSCREEN_CONFIGDATA
# include "platform/configdata.hr" # include "platform/configdata.h"
#endif #endif
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)

View File

@ -44,7 +44,9 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* The background commands require pthread support */ /* The background commands require pthread support */
#ifdef CONFIG_DISABLE_PTHREAD #ifdef CONFIG_DISABLE_PTHREAD
@ -138,8 +140,8 @@
# error "No NSH front end defined" # error "No NSH front end defined"
#endif #endif
/* If a USB device is selected for the NSH console then we need to handle some /* If a USB device is selected for the NSH console then we need to handle
* special start-up conditions. * some special start-up conditions.
*/ */
#undef HAVE_USB_CONSOLE #undef HAVE_USB_CONSOLE
@ -429,8 +431,8 @@
#endif #endif
/* strerror() produces much nicer output but is, however, quite large and /* 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 * will only be used if CONFIG_NSH_STRERROR is defined. Note that the
* interface must also have been enabled with CONFIG_LIBC_STRERROR. * strerror interface must also have been enabled with CONFIG_LIBC_STRERROR.
*/ */
#ifndef CONFIG_LIBC_STRERROR #ifndef CONFIG_LIBC_STRERROR
@ -823,7 +825,8 @@ int nsh_usbconsole(void);
#endif #endif
#if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT) #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 #ifdef CONFIG_NSH_ROMFSETC
int nsh_initscript(FAR struct nsh_vtbl_s *vtbl); int nsh_initscript(FAR struct nsh_vtbl_s *vtbl);
#ifdef CONFIG_NSH_ROMFSRC #ifdef CONFIG_NSH_ROMFSRC
@ -1151,7 +1154,7 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif #endif
#if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN) #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 #endif
#if (defined(CONFIG_BOARDCTL_POWEROFF) || defined(CONFIG_BOARDCTL_RESET)) && \ #if (defined(CONFIG_BOARDCTL_POWEROFF) || defined(CONFIG_BOARDCTL_RESET)) && \

View File

@ -608,7 +608,8 @@ int cmd_cp(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{ {
/* Read error */ /* 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; 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.filename = filepath; /* The file or character device to use */
setup.sectsize = 512; /* The sector size to use with the block device */ 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.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)); ret = ioctl(fd, LOOPIOC_SETUP, (unsigned long)((uintptr_t)&setup));
if (ret < 0) 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.minor = minor; /* Minor device number of the RAM disk. */
desc.nsectors = nsectors; /* The number of sectors in 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.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); ret = boardctl(BOARDIOC_MKRD, (uintptr_t)&desc);
if (ret < 0) if (ret < 0)
@ -1852,8 +1853,8 @@ int cmd_truncate(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
else else
{ {
/* We successfully performed the create and now have a zero- /* We successfully performed the create and now have a zero-
* length file. Perform the truncation to extend the allocation * length file. Perform the truncation to extend the
* (unless we really wanted a zero-length file). * allocation (unless we really wanted a zero-length file).
*/ */
ret = OK; ret = OK;

View File

@ -244,8 +244,8 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
FAR char *rpath; FAR char *rpath;
int ret; int ret;
/* The fist argument on the command line should be the NFS server IP address /* The fist argument on the command line should be the NFS server IP
* in standard IPv4 (or IPv6) dot format. * address in standard IPv4 (or IPv6) dot format.
*/ */
address = argv[1]; address = argv[1];
@ -330,8 +330,8 @@ int cmd_nfsmount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
data.path = rpath; data.path = rpath;
data.flags = 0; /* 0=Use all defaults */ data.flags = 0; /* 0=Use all defaults */
/* The local mount point path (lpath) might be relative to the current working /* The local mount point path (lpath) might be relative to the current
* directory. * working directory.
*/ */
lpath = nsh_getfullpath(vtbl, argv[2]); lpath = nsh_getfullpath(vtbl, argv[2]);