From 754da40f1a9d7ac5a75a9091b67df68e5da29626 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 28 May 2010 16:02:21 -0700 Subject: always zero vtw_def struct before parsing template --- src/cli_parse.y | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/cli_parse.y b/src/cli_parse.y index 0f32928..107b874 100644 --- a/src/cli_parse.y +++ b/src/cli_parse.y @@ -245,6 +245,8 @@ char *parse_path; int parse_def(vtw_def *defp, char *path, boolean type_only) { int status; + /* always zero vtw_def struct */ + memset(defp, 0, sizeof(vtw_def)); yy_cli_def_lineno = 1; parse_status = 0; parse_defp = defp; -- cgit v1.2.3