diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-28 17:34:06 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-28 17:34:06 -0800 |
commit | 291f2bfd4289db9199cb427a86b0c7f47758f202 (patch) | |
tree | 78cb54824e630f5286d46171c88c1ccf3bf7fa9c | |
parent | c8d1dadea502044f66f5c5c8e2417a4b5c755296 (diff) | |
download | vyatta-cfg-291f2bfd4289db9199cb427a86b0c7f47758f202.tar.gz vyatta-cfg-291f2bfd4289db9199cb427a86b0c7f47758f202.zip |
handle empty action
-rw-r--r-- | src/cli_def.l | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cli_def.l b/src/cli_def.l index c90b3c3..71bd71f 100644 --- a/src/cli_def.l +++ b/src/cli_def.l @@ -85,11 +85,9 @@ append_str(char *text) static int return_action() { - if (action_ptr != action_buf) { - *action_ptr = 0; - yy_cli_parse_lval.strp = strdup(action_buf); - action_ptr = action_buf; - } + *action_ptr = 0; + yy_cli_parse_lval.strp = strdup(action_buf); + action_ptr = action_buf; return STRING; } |