[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] json: Update jsmn library to upstream commit 053d3cd
From: |
Daniel Kiper |
Subject: |
Re: [PATCH 1/2] json: Update jsmn library to upstream commit 053d3cd |
Date: |
Thu, 16 Apr 2020 14:29:43 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Apr 16, 2020 at 12:19:48PM +0200, Patrick Steinhardt wrote:
> Update our embedded version of the jsmn library to upstream commit
> 053d3cd (Merge pull request #175 from pks-t/pks/struct-type,
> 2020-04-02).
Does this commit contain all changes listed below? No more no less?
If yes Reviewed-by: Daniel Kiper <address@hidden>
Daniel
> Signed-off-by: Patrick Steinhardt <address@hidden>
> ---
> grub-core/lib/json/jsmn.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/grub-core/lib/json/jsmn.h b/grub-core/lib/json/jsmn.h
> index b95368a20..3178dcc97 100644
> --- a/grub-core/lib/json/jsmn.h
> +++ b/grub-core/lib/json/jsmn.h
> @@ -66,7 +66,7 @@ enum jsmnerr {
> * start start position in JSON data string
> * end end position in JSON data string
> */
> -typedef struct {
> +typedef struct jsmntok {
> jsmntype_t type;
> int start;
> int end;
> @@ -80,7 +80,7 @@ typedef struct {
> * JSON parser. Contains an array of token blocks available. Also stores
> * the string being parsed now and current position in that string.
> */
> -typedef struct {
> +typedef struct jsmn_parser {
> unsigned int pos; /* offset in the JSON string */
> unsigned int toknext; /* next token to allocate */
> int toksuper; /* superior token node, e.g. parent object or array
> */
> @@ -154,6 +154,9 @@ static int jsmn_parse_primitive(jsmn_parser *parser,
> const char *js,
> case ']':
> case '}':
> goto found;
> + default:
> + /* to quiet a warning from gcc*/
> + break;
> }
> if (js[parser->pos] < 32 || js[parser->pos] >= 127) {
> parser->pos = start;
> --
> 2.26.1