[iproute2] json: fix backslash escape typo in jsonw_puts
diff mbox series

Message ID 20190718011531.GA29129@visor
State Accepted
Delegated to: stephen hemminger
Headers show
Series
  • [iproute2] json: fix backslash escape typo in jsonw_puts
Related show

Commit Message

Ivan Delalande July 18, 2019, 1:15 a.m. UTC
Fixes: fcc16c22 ("provide common json output formatter")
Signed-off-by: Ivan Delalande <colona@arista.com>
---
 lib/json_writer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Hemminger July 19, 2019, 5:54 p.m. UTC | #1
On Wed, 17 Jul 2019 18:15:31 -0700
Ivan Delalande <colona@arista.com> wrote:

> Fixes: fcc16c22 ("provide common json output formatter")
> Signed-off-by: Ivan Delalande <colona@arista.com>

Applied.

Patch
diff mbox series

diff --git a/lib/json_writer.c b/lib/json_writer.c
index 5004c181..88c5eb88 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);