json: Tighten and simplify qstring_from_escaped_str()'s loop
commit00ea57fadcb899b7e21079dacb47b6fb8af5b2fa
authorMarkus Armbruster <armbru@redhat.com>
Thu, 23 Aug 2018 16:39:47 +0000 (23 18:39 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 24 Aug 2018 18:26:37 +0000 (24 20:26 +0200)
tree625d0703969b40598d4fbe5c66a2b80f6f3ea143
parenteddc0a7f0ad84edd0f8dd27d4a70a305ccd7bc5f
json: Tighten and simplify qstring_from_escaped_str()'s loop

Simplify loop control, and assert that the string ends with the
appropriate quote (the lexer ensures it does).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-21-armbru@redhat.com>
qobject/json-parser.c