Skip to content

Commit

Permalink
xxx
Browse files Browse the repository at this point in the history
  • Loading branch information
lefessan committed Dec 14, 2023
1 parent 4d94efa commit f85fa91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions cobc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion cobc/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f85fa91

Please sign in to comment.