sfeed_curses

[fork] sfeed (atom feed) reader
Log | Files | Refs | README | LICENSE

commit d4a647803cc05e8f81c14e15347c908c8c856b5c
parent 65ad93dffac988b25debbe4c960b5785b3880caf
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 13 Jul 2020 18:19:46 +0200

feeds_load: do not close and reopen the current feed needlessly

Diffstat:
Msfeed_curses.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -1159,14 +1159,14 @@ feeds_load(struct feed *feeds, size_t nfeeds) } /* load first items, because of first selection or stdin. */ - if (i == 0 || f == curfeed) + if (i == 0 || f == curfeed) { feed_load(f, f->fp); - else + } else { feed_count(f, f->fp); - - if (f->path && f->fp) { - fclose(f->fp); - f->fp = NULL; + if (f->path && f->fp) { + fclose(f->fp); + f->fp = NULL; + } } } }