commit 19cc32850dde2fe3fff1f02d8470727b84a5f67b
parent 04c76f86b66d2c30cadc6fef4df98cb3077ebcd9
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 29 Dec 2023 14:10:38 +0100
sfeed_gopher: fix a clang-analyzer warning
When reading from stdin the fields `total` and `totalnew` structure of feed are
incremented. However this value was uninitialized.
For stdin the result was not read and unused anyway though.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sfeed_gopher.c b/sfeed_gopher.c
@@ -118,7 +118,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
int
main(int argc, char *argv[])
{
- struct feed f;
+ struct feed f = { 0 };
FILE *fpitems, *fpindex, *fp;
char *name, *p;
int i;