From 1217d5a66d2e84372af577165568e5911868aa6b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 20 Aug 2006 22:07:06 +0000 Subject: 22650: remove now buggy pointer to last added style --- Src/Modules/zutil.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Src') diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c index e3e4c8353..1e4bf975a 100644 --- a/Src/Modules/zutil.c +++ b/Src/Modules/zutil.c @@ -54,7 +54,7 @@ struct stypat { /* List of styles. */ -static Style zstyles, zlstyles; +static Style zstyles; /* Memory stuff. */ @@ -117,7 +117,7 @@ freeallstyles(void) zsfree(s->name); zfree(s, sizeof(*s)); } - zstyles = zlstyles = NULL; + zstyles = NULL; } /* Get the style struct for a name. */ @@ -233,11 +233,8 @@ addstyle(char *name) s->pats = NULL; s->name = ztrdup(name); - if (zlstyles) - zlstyles->next = s; - else - zstyles = s; - zlstyles = s; + s->next = zstyles; + zstyles = s; return s; } @@ -1748,7 +1745,7 @@ static struct builtin bintab[] = { int setup_(UNUSED(Module m)) { - zstyles = zlstyles = NULL; + zstyles = NULL; return 0; } -- cgit 1.4.1