summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-08-03 09:02:08 +0200
committerdefault <nobody@localhost>2023-08-03 09:02:08 +0200
commitf5a3dbf8d652dbf87f9ff27b50d11f6364551a61 (patch)
treea3c8fabb5baa25bde203a9cc8089134b8774d723 /html.c
parent2137d2f13310aca3cef6a0fc7735fdf4aac53e8c (diff)
Use xs_json_dump_pp() wherever possible.
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/html.c b/html.c
index e96eb41..5313394 100644
--- a/html.c
+++ b/html.c
@@ -1985,10 +1985,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
p_vars = xs_dict_get(req, "p_vars");
#if 0
- {
- xs *j1 = xs_json_dumps_pp(p_vars, 4);
- printf("%s\n", j1);
- }
+ xs_json_dump_pp(p_vars, 4, stdout);
#endif
if (p_path && strcmp(p_path, "admin/note") == 0) { /** **/
@@ -2310,8 +2307,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
rename(fn, bfn);
if ((f = fopen(fn, "w")) != NULL) {
- xs *j = xs_json_dumps_pp(snac.config, 4);
- fwrite(j, strlen(j), 1, f);
+ xs_json_dump_pp(snac.config, 4, f);
fclose(f);
}
else