From 072b660a233cc94b27e2665cee5d2f97f33916ec Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 23 Oct 2001 13:57:57 +0000 Subject: From Greg Stark: clean up some use of possibly uninitialized fields. --- zwgc/tty_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zwgc') diff --git a/zwgc/tty_filter.c b/zwgc/tty_filter.c index 86ab8f9..1a05cf5 100644 --- a/zwgc/tty_filter.c +++ b/zwgc/tty_filter.c @@ -321,6 +321,7 @@ static tty_str_info *convert_desc_to_tty_str_info(desc) /* Add new block (call it temp) to result: */ temp = (tty_str_info *)malloc(sizeof(struct _tty_str_info)); + *temp = current_mode; if (last_result_block) { last_result_block->next = temp; last_result_block = temp; @@ -344,13 +345,13 @@ static tty_str_info *convert_desc_to_tty_str_info(desc) } if (desc->code == DT_STR) { /* just combine string info with current mode: */ - *temp = current_mode; temp->str = desc->str; temp->len = desc->len; } else if (desc->code == DT_NL) { /* make the new block a ' ' alignment block with an empty string */ temp->alignment = ' '; temp->len = 0; + temp->ignore = 0; } } -- cgit v1.2.3