From 3819912e34d2c872e2c889c1988e567ee90fe29d Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 14 Dec 2014 18:47:46 +0100 Subject: [PATCH] inpcom.c, cleanup `inp_sort_params()', local scope for some variables --- src/frontend/inpcom.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 4f043f5dd..be1244dee 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -3669,11 +3669,9 @@ static char *ya_search_identifier(char *str, const char *identifier, char *str_b static void inp_sort_params(struct line *start_card, struct line *end_card, struct line *card_bf_start, struct line *s_c, struct line *e_c) { - int i, j, num_params, ind = 0, max_level, num_terminals = 0; - bool in_control = FALSE; + int i, j, num_params, ind = 0, max_level; struct line *c, *tail; - char *str_ptr, *beg, *end, *new_str; int skipped; int arr_size; @@ -3740,8 +3738,13 @@ inp_sort_params(struct line *start_card, struct line *end_card, struct line *car } /* look for unquoted parameters and quote them */ +{ + struct line *c; + bool in_control = FALSE; + int num_terminals = 0; + int i, j; + char *str_ptr, *beg, *end, *new_str; - in_control = FALSE; for (c = s_c; c && c != e_c; c = c->li_next) { char *curr_line = c->li_line; @@ -3814,6 +3817,7 @@ inp_sort_params(struct line *start_card, struct line *end_card, struct line *car } } } + } c = card_bf_start; tail = c->li_next;