commit a6b7e959ba2a3a8f19e0dcbe70226d95f18b0e5a
parent 82204328efe8965bbd4a7a9028a334092d136098
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 14 Jul 2020 21:32:26 +0200
feed_count: set totalnew, total = 0 in the function itself, like feed_load()
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1090,6 +1090,7 @@ feed_count(struct feed *f, FILE *fp)
ssize_t linelen;
time_t parsedtime;
+ f->totalnew = f->total = 0;
while ((linelen = getline(&line, &linesize, fp)) > 0) {
if (line[linelen - 1] == '\n')
line[--linelen] = '\0';
@@ -1146,7 +1147,6 @@ feeds_load(struct feed *feeds, size_t nfeeds)
for (i = 0; i < nfeeds; i++) {
f = &feeds[i];
- f->totalnew = f->total = 0;
if (f->path) {
if (f->fp) {