31 lines
977 B
Diff
31 lines
977 B
Diff
|
From 742a2436d344ac15330c56a2326c03c8c56686a5 Mon Sep 17 00:00:00 2001
|
||
|
From: Ivan Delalande <colona@arista.com>
|
||
|
Date: Wed, 17 Jul 2019 18:15:31 -0700
|
||
|
Subject: [PATCH] json: fix backslash escape typo in jsonw_puts
|
||
|
|
||
|
Fixes: fcc16c22 ("provide common json output formatter")
|
||
|
Signed-off-by: Ivan Delalande <colona@arista.com>
|
||
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||
|
(cherry picked from commit ed54f76484b5ee47b190a202ecf29fce60d0d878)
|
||
|
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
||
|
---
|
||
|
lib/json_writer.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/lib/json_writer.c b/lib/json_writer.c
|
||
|
index 5004c181e6225..88c5eb8882254 100644
|
||
|
--- a/lib/json_writer.c
|
||
|
+++ b/lib/json_writer.c
|
||
|
@@ -75,7 +75,7 @@ static void jsonw_puts(json_writer_t *self, const char *str)
|
||
|
fputs("\\b", self->out);
|
||
|
break;
|
||
|
case '\\':
|
||
|
- fputs("\\n", self->out);
|
||
|
+ fputs("\\\\", self->out);
|
||
|
break;
|
||
|
case '"':
|
||
|
fputs("\\\"", self->out);
|
||
|
--
|
||
|
2.22.0
|
||
|
|