Skip to content

Commit 0536c5b

Browse files
committed
apps/nshlib/nsh_parse.c: Correct an error found in build testing. Commit 2a462c7 was insufficient. It was a mistake to revert Xiang's change of commit 9defae8. But we are on a different vector now.
1 parent 2a462c7 commit 0536c5b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nshlib/nsh_parse.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@
9292
# define NSH_MEMLIST_FREE(m)
9393
#endif
9494

95+
/* Do we need g_nullstring[]? */
96+
97+
#undef NEED_NULLSTRING
98+
#if defined(NSH_HAVE_VARS) || defined(CONFIG_NSH_CMDPARMS)
99+
# define NEED_NULLSTRING 1
100+
#elif !defined(CONFIG_NSH_ARGCAT) || !defined(HAVE_MEMLIST)
101+
# define NEED_NULLSTRING 1
102+
#endif
103+
95104
/****************************************************************************
96105
* Private Types
97106
****************************************************************************/
@@ -222,7 +231,7 @@ static const char g_exitstatus[] = "?";
222231
static const char g_success[] = "0";
223232
static const char g_failure[] = "1";
224233
#endif
225-
#if defined(NSH_HAVE_VARS) || defined(CONFIG_NSH_CMDPARMS)
234+
#ifdef NEED_NULLSTRING
226235
static const char g_nullstring[] = "";
227236
#endif
228237

0 commit comments

Comments
 (0)