From 3457c30c3315c9c09e468724b759281a0737af89 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 12 Sep 2019 15:38:53 -0600 Subject: [PATCH] apps/nshlib: Fix some typos and minor coding staqndard problems. --- nshlib/README.txt | 2 +- nshlib/nsh_fscmds.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nshlib/README.txt b/nshlib/README.txt index 8d8cec1ee..d12f95be2 100644 --- a/nshlib/README.txt +++ b/nshlib/README.txt @@ -865,7 +865,7 @@ o mkfifo o mkrd [-m ] [-s ] Create a ramdisk consisting of , each of size - (or 512 bytes if is not specified. + (or 512 bytes if is not specified). The ramdisk will be registered as /dev/ram. If is not specified, mkrd will attempt to register the ramdisk as /dev/ram0. diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index 8473dca6d..923b2a9ee 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -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;