From 7dafbada4e4c6cd6cd9380cbf9aba9b348c1980e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 24 Feb 2008 19:02:43 +0100 Subject: [PATCH] Use ef_blank() when extending news file The call of ef_ensure_space() serves no purpose: the blank records it adds are ignored on read, and overwritten (not updated) by new news. Get rid of it. --- src/lib/subs/nreport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/subs/nreport.c b/src/lib/subs/nreport.c index b4265753..715a4c84 100644 --- a/src/lib/subs/nreport.c +++ b/src/lib/subs/nreport.c @@ -184,12 +184,12 @@ ncache(int actor, int event, int victim, int times) if (CANT_HAPPEN(!strstr(rpt[event].r_newstory[0], "%s") && victim != 0)) victim = 0; np = &cache[actor][oldslot]; + ef_blank(EF_NEWS, news_tail, &np->news); np->news.nws_ano = actor; np->news.nws_vno = victim; np->news.nws_when = now; np->news.nws_vrb = event; np->news.nws_ntm = times; - ef_ensure_space(EF_NEWS, news_tail, 100); np->id = news_tail++; return np; }