summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/com_err/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/com_err/error.c')
-rw-r--r--crypto/heimdal/lib/com_err/error.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/heimdal/lib/com_err/error.c b/crypto/heimdal/lib/com_err/error.c
index d122007..b22f25b 100644
--- a/crypto/heimdal/lib/com_err/error.c
+++ b/crypto/heimdal/lib/com_err/error.c
@@ -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).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: error.c,v 1.14 1999/12/02 16:58:38 joda Exp $");
+RCSID("$Id: error.c,v 1.15 2001/02/28 20:00:13 joda Exp $");
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -62,9 +62,9 @@ initialize_error_table_r(struct et_list **list,
int num_errors,
long base)
{
- struct et_list *et;
+ struct et_list *et, **end;
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)
return;
f = malloc(sizeof(*f));
@@ -75,8 +75,8 @@ initialize_error_table_r(struct et_list **list,
et->table->msgs = messages;
et->table->n_msgs = num_errors;
et->table->base = base;
- et->next = *list;
- *list = et;
+ et->next = NULL;
+ *end = et;
}
OpenPOWER on IntegriCloud