]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/jsonwrt: use proper output function
authorKarel Zak <kzak@redhat.com>
Thu, 12 Nov 2020 10:38:55 +0000 (11:38 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 12 Nov 2020 10:38:55 +0000 (11:38 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/jsonwrt.c

index 6d559dd71e39a8539915a62bc63fc52732dac962..00e8b9d2512654b1d74b5d17567a7ffa3fbc6c60 100644 (file)
@@ -35,7 +35,7 @@ void ul_jsonwrt_open(struct ul_jsonwrt *fmt, const char *name, int type)
        else {
                ul_jsonwrt_indent(fmt);
                if (name)
-                       fputs_quoted(name, fmt->out);
+                       fputs_quoted_json_lower(name, fmt->out);
        }
 
        switch (type) {
@@ -104,7 +104,7 @@ void ul_jsonwrt_value_s(struct ul_jsonwrt *fmt,
 {
        ul_jsonwrt_value_open(fmt, name);
        if (data && *data)
-               fputs_quoted(data, fmt->out);
+               fputs_quoted_json(data, fmt->out);
        else
                fputs("null", fmt->out);
        ul_jsonwrt_value_close(fmt, islast);