summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-12 03:32:54 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-12 03:32:54 +0000
commit25457361c7b7e87b2c67860aa5afceaa4b1d5797 (patch)
tree54818642fbd005ec716533faffcfb991e3bcb70b
parentac4bbe6bd6be3bea77822e95f6d485c4744eaeac (diff)
Changed mallocs to callocs.
-rw-r--r--src/filter.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/filter.c b/src/filter.c
index fa19440..3700c63 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -1,4 +1,4 @@
-/* $Id: filter.c,v 1.5 2001-09-08 18:58:37 rjkaes Exp $
+/* $Id: filter.c,v 1.6 2001-09-12 03:32:54 rjkaes Exp $
*
* Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca)
*
@@ -53,17 +53,11 @@ void filter_init(void)
while (fgets(buf, 255, fd)) {
s = buf;
if (!p) /* head of list */
- fl = p = (struct filter_list *)
- safemalloc(sizeof
- (struct filter_list));
+ fl = p = safecalloc(1, sizeof(struct filter_list));
else { /* next entry */
- p->next = (struct filter_list *)
- safemalloc(sizeof
- (struct filter_list));
+ p->next = safecalloc(1, sizeof(struct filter_list));
p = p->next;
}
- /* initialize space to zero */
- memset(p, 0, sizeof(struct filter_list));
/* replace first whitespace with \0 */
while (*s++)