sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 3a5295f595acee81170565ba0405a64d7110a229
parent 08add9b95e58bc4e7ece8137efe8dc0905a94467
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue,  6 Oct 2020 18:45:54 +0200

fix counting due to uninitialized variable when the time could not be parsed

Since commit 276d5789fd91d1cbe84b7baee736dea28b1e04c0 if the time is empty or
could not be parsed then it is shown/aligned as a blank space instead of being
skipped.

An oversight in this change was that items should be counted and set in
`isnew`.

This commit fixes the uninitialized variable and possible miscounting.

Diffstat:
Msfeed_frames.c | 1+
Msfeed_html.c | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sfeed_frames.c b/sfeed_frames.c @@ -50,6 +50,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); } else { + isnew = 0; fputs(" ", fpitems); } f->total++; diff --git a/sfeed_html.c b/sfeed_html.c @@ -51,6 +51,7 @@ printfeed(FILE *fp, struct feed *f) tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); } else { + isnew = 0; fputs(" ", stdout); } f->total++;