From 3d9607ccfa232e126a8b1449e4debe29df6a9e9f Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 26 Apr 2008 17:50:02 +0000 Subject: [PATCH] return upon NULL as the first task --- src/frontend/inpcom.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 0a142c374..9fec43269 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -2863,14 +2863,15 @@ inp_sort_params( struct line *start_card, struct line *end_card, struct line *ca int skipped = 0; int arr_size = 12000; - // dynamic memory allocation int *level; int *param_skip; char **param_names; char **param_strs; char ***depends_on; struct line **ptr_array; - struct line **ptr_array_ordered; + struct line **ptr_array_ordered; + + if ( start_card == NULL ) return; /* determine the number of lines with .param */ ptr = start_card; @@ -2884,7 +2885,8 @@ inp_sort_params( struct line *start_card, struct line *end_card, struct line *ca arr_size = num_params; num_params = 0; /* This is just to keep the code in row 2907ff. */ - + + // dynamic memory allocation level = (int *) tmalloc(arr_size*sizeof(int)); param_skip = (int *) tmalloc(arr_size*sizeof(int)); param_names = (char **) tmalloc(arr_size*sizeof(char*)); @@ -2901,8 +2903,6 @@ inp_sort_params( struct line *start_card, struct line *end_card, struct line *ca ptr_array = (struct line **) tmalloc(arr_size*sizeof(struct line *)); ptr_array_ordered = (struct line **) tmalloc(arr_size*sizeof(struct line *)); - - if ( start_card == NULL ) return; ptr = start_card; while ( ptr != NULL )