summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-01-06 19:34:09 -0500
committerGitHub <noreply@github.com>2017-01-06 19:34:09 -0500
commit15667da96d34556edbb6050008fe3ae2f0f75f8e (patch)
tree0009a62697a9d5150a94c6e66034a32880ae985d /lib/command.c
parentb89e46b2e217d92aa7b55d8ee70a6bd0ff5d3566 (diff)
parenta8e4ddd408bd6bd689bc88551a2a461cc81b432a (diff)
Merge pull request #24 from qlyoung/fix-uninitialized-jump
lib: Initialize ->allowrepeat
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index 039722ae6b..35aac3e6e3 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2400,12 +2400,13 @@ cmd_init (int terminal)
struct cmd_token *
new_cmd_token (enum cmd_token_type type, u_char attr, char *text, char *desc)
{
- struct cmd_token *token = XMALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token));
+ struct cmd_token *token = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token));
token->type = type;
token->attr = attr;
token->text = text;
token->desc = desc;
token->arg = NULL;
+ token->allowrepeat = false;
return token;
}