forked from Mirror/frr
lib: Fix overlapping memory type
Make a unique memory type so we are not overlapping another one. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
cd0956e69d
commit
b6ab009b99
|
@ -19,7 +19,7 @@
|
|||
|
||||
#define GRAMMAR_STR "CLI grammar sandbox\n"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command desc");
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_DESCRIPTIONS, "Command desc");
|
||||
|
||||
/** headers **/
|
||||
void grammar_sandbox_init(void);
|
||||
|
@ -53,7 +53,7 @@ DEFUN (grammar_test,
|
|||
|
||||
// create cmd_element for parser
|
||||
struct cmd_element *cmd =
|
||||
XCALLOC(MTYPE_CMD_TOKENS, sizeof(struct cmd_element));
|
||||
XCALLOC(MTYPE_CMD_DESCRIPTIONS, sizeof(struct cmd_element));
|
||||
cmd->string = command;
|
||||
cmd->doc =
|
||||
"0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n";
|
||||
|
@ -207,11 +207,11 @@ DEFUN (grammar_test_doc,
|
|||
|
||||
// create cmd_element with docstring
|
||||
struct cmd_element *cmd =
|
||||
XCALLOC(MTYPE_CMD_TOKENS, sizeof(struct cmd_element));
|
||||
XCALLOC(MTYPE_CMD_DESCRIPTIONS, sizeof(struct cmd_element));
|
||||
cmd->string = XSTRDUP(
|
||||
MTYPE_CMD_TOKENS,
|
||||
MTYPE_CMD_DESCRIPTIONS,
|
||||
"test docstring <example|selector follow> (1-255) end VARIABLE [OPTION|set lol] . VARARG");
|
||||
cmd->doc = XSTRDUP(MTYPE_CMD_TOKENS,
|
||||
cmd->doc = XSTRDUP(MTYPE_CMD_DESCRIPTIONS,
|
||||
"Test stuff\n"
|
||||
"docstring thing\n"
|
||||
"first example\n"
|
||||
|
|
Loading…
Reference in a new issue