From f85fa913660c20ee71f23e13d2289cf7d5b0df7a Mon Sep 17 00:00:00 2001 From: Fabrice Le Fessant Date: Thu, 14 Dec 2023 23:12:03 +0100 Subject: [PATCH] xxx --- cobc/codegen.c | 7 +++---- cobc/tree.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cobc/codegen.c b/cobc/codegen.c index 0c943a9e5..fe0ac9772 100644 --- a/cobc/codegen.c +++ b/cobc/codegen.c @@ -4328,15 +4328,14 @@ procedure_list_add ( p->proc.file = file; p->proc.line = line; p->proc.section = section; + p->next = NULL; if (program->procedure_list == NULL){ program->procedure_list = p; - p->last = p; - p->next = NULL; } else { - program->procedure_list->last->next = p; - program->procedure_list->last = p; + program->procedure_list_last->next = p; } + program->procedure_list_last = p; program->procedure_list_len++; return ret; diff --git a/cobc/tree.h b/cobc/tree.h index 9693974c2..f1bc43cf1 100644 --- a/cobc/tree.h +++ b/cobc/tree.h @@ -1798,7 +1798,6 @@ struct cb_ml_generate_tree { struct cb_procedure_list { struct cb_procedure_list *next; - struct cb_procedure_list *last; struct cob_prof_procedure proc; }; @@ -1903,6 +1902,7 @@ struct cb_program { /* Data and functions used for profiling */ struct cb_procedure_list *procedure_list; + struct cb_procedure_list *procedure_list_last; int procedure_list_len; int prof_current_section; int prof_current_paragraph;