From 0927932b94f9fc5abd4e509ffa40a5ed615848fc Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 3 Aug 2014 18:48:11 +0200 Subject: [PATCH] inpcom.c, inp_sort_params(), cleanup usage of `arr_size' --- src/frontend/inpcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 66d4bbc00..1e257f123 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -3670,7 +3670,7 @@ inp_sort_params(struct line *start_card, struct line *end_card, struct line *car struct line *c; char *str_ptr, *beg, *end, *new_str; int skipped = 0; - int arr_size = 12000; + int arr_size; struct dependency *deps; @@ -3681,11 +3681,11 @@ inp_sort_params(struct line *start_card, struct line *end_card, struct line *car /* determine the number of lines with .param */ + arr_size = 0; for (c = start_card; c; c = c->li_next) if (strchr(c->li_line, '=')) - num_params++; + arr_size ++; - arr_size = num_params; num_params = 0; /* This is just to keep the code in row 2907ff. */ deps = TMALLOC(struct dependency, arr_size);