Skip to content

Commit

Permalink
apps/nshlib/nsh_parse.c: Correct an error found in build testing. Com…
Browse files Browse the repository at this point in the history
…mit 2a462c7 was insufficient.  It was a mistake to revert Xiang's change of commit 9defae8.  But we are on a different vector now.
  • Loading branch information
gregory-nutt committed Dec 24, 2019
1 parent 2a462c7 commit 0536c5b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion nshlib/nsh_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@
# define NSH_MEMLIST_FREE(m)
#endif

/* Do we need g_nullstring[]? */

#undef NEED_NULLSTRING
#if defined(NSH_HAVE_VARS) || defined(CONFIG_NSH_CMDPARMS)
# define NEED_NULLSTRING 1
#elif !defined(CONFIG_NSH_ARGCAT) || !defined(HAVE_MEMLIST)
# define NEED_NULLSTRING 1
#endif

/****************************************************************************
* Private Types
****************************************************************************/
Expand Down Expand Up @@ -222,7 +231,7 @@ static const char g_exitstatus[] = "?";
static const char g_success[] = "0";
static const char g_failure[] = "1";
#endif
#if defined(NSH_HAVE_VARS) || defined(CONFIG_NSH_CMDPARMS)
#ifdef NEED_NULLSTRING
static const char g_nullstring[] = "";
#endif

Expand Down

0 comments on commit 0536c5b

Please sign in to comment.