summaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/nshlib/nsh_console.c')
-rw-r--r--apps/nshlib/nsh_console.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/nshlib/nsh_console.c b/apps/nshlib/nsh_console.c
index 41e992678..de7537bd7 100644
--- a/apps/nshlib/nsh_console.c
+++ b/apps/nshlib/nsh_console.c
@@ -175,10 +175,10 @@ static void nsh_closeifnotclosed(struct console_stdio_s *pstate)
static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes)
{
+#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct console_stdio_s *pstate = (FAR struct console_stdio_s *)vtbl;
ssize_t ret;
-#if CONFIG_NFILE_DESCRIPTORS > 0
/* The stream is open in a lazy fashion. This is done because the file
* descriptor may be opened on a different task than the stream. The
* actual open will then occur with the first output from the new task.
@@ -238,7 +238,6 @@ static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, const char *fmt, ...)
#else
va_list ap;
char *str;
- int ret;
/* Use avsprintf() to allocate a buffer and fill it with the formatted
* data