(initialize_error_table_r): put table at end of the list

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9724 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2001-02-28 20:00:13 +00:00
parent 090c8d873d
commit 607272201e

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan * Copyright (c) 1997, 1998, 2001 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -62,9 +62,9 @@ initialize_error_table_r(struct et_list **list,
int num_errors, int num_errors,
long base) long base)
{ {
struct et_list *et; struct et_list *et, **end;
struct foobar *f; struct foobar *f;
for (et = *list; et; et = et->next) for (end = list, et = *list; et; end = &et->next, et = et->next)
if (et->table->msgs == messages) if (et->table->msgs == messages)
return; return;
f = malloc(sizeof(*f)); f = malloc(sizeof(*f));
@@ -75,8 +75,8 @@ initialize_error_table_r(struct et_list **list,
et->table->msgs = messages; et->table->msgs = messages;
et->table->n_msgs = num_errors; et->table->n_msgs = num_errors;
et->table->base = base; et->table->base = base;
et->next = *list; et->next = NULL;
*list = et; *end = et;
} }