summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2023-12-29 14:10:38 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-12-29 14:10:38 +0100
commit19cc32850dde2fe3fff1f02d8470727b84a5f67b (patch)
treed2505ae9b9ab4b622f333fb3aa3b2394d505f084
parent04c76f86b66d2c30cadc6fef4df98cb3077ebcd9 (diff)
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.
-rw-r--r--sfeed_gopher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfeed_gopher.c b/sfeed_gopher.c
index f9ee9b8..3512b72 100644
--- 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;