apps/nshlib: Fix some typos and minor coding staqndard problems.

This commit is contained in:
Gregory Nutt 2019-09-12 15:38:53 -06:00
parent b2a3ba57ff
commit 3457c30c33
2 changed files with 4 additions and 4 deletions

View File

@ -865,7 +865,7 @@ o mkfifo <path>
o mkrd [-m <minor>] [-s <sector-size>] <nsectors>
Create a ramdisk consisting of <nsectors>, each of size
<sector-size> (or 512 bytes if <sector-size> is not specified.
<sector-size> (or 512 bytes if <sector-size> is not specified).
The ramdisk will be registered as /dev/ram<minor>. If <minor> is
not specified, mkrd will attempt to register the ramdisk as
/dev/ram0.

View File

@ -1349,7 +1349,7 @@ int cmd_mkfifo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
const char *fmt;
uint8_t *buffer;
FAR uint8_t *buffer;
uint32_t nsectors;
bool badarg = false;
int sectsize = 512;
@ -1403,7 +1403,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* There should be exactly one parameter left on the command-line */
if (optind == argc-1)
if (optind == argc - 1)
{
nsectors = (uint32_t)atoi(argv[optind]);
}
@ -1420,7 +1420,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* Allocate the memory backing up the ramdisk */
buffer = (uint8_t*)malloc(sectsize * nsectors);
buffer = (FAR uint8_t *)malloc(sectsize * nsectors);
if (!buffer)
{
fmt = g_fmtcmdoutofmemory;