Introduction
Introduction Statistics Contact Development Disclaimer Help
jf2sfeed.c: fix: print the last item - jfconvert - JSON Feed (subset) to sfeed …
git clone git://git.codemadness.org/jfconvert
Log
Files
Refs
README
LICENSE
---
commit dd5f1d67da802e210e66abf707c4741a2c2b5845
parent 283d0c62865adfe4ea69c696999720d3c9228a19
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 9 Sep 2024 18:11:32 +0200
jf2sfeed.c: fix: print the last item
Diffstat:
M jf2sfeed.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/jf2sfeed.c b/jf2sfeed.c
@@ -532,9 +532,6 @@ main(int argc, char *argv[])
if (pledge("stdio", NULL) == -1)
err(1, "pledge");
- if (itemisopen)
- printfields();
-
switch (parsejson(processnode)) {
case JSON_ERROR_MEM:
errx(2, "error: cannot allocate enough memory");
@@ -542,6 +539,9 @@ main(int argc, char *argv[])
errx(1, "error: invalid JSON");
}
+ if (itemisopen)
+ printfields();
+
if (ferror(stdin))
errx(2, "read error: <stdin>");
if (fflush(stdout) || ferror(stdout))
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.