diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-03-07 21:44:45 +0100 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-03-07 21:44:45 +0100 |
commit | 00585c403abf45ac15b53176262aee4b05641f23 (patch) | |
tree | 2328362ca4c8a946e234ee247316b96adbb85bf9 /src/json.c | |
parent | a715292793538812e132405a18e2cbc947789403 (diff) |
json.c: use VLA notation
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -143,7 +143,11 @@ enum json_parse_result parse_value(struct json **json_out, struct raw_json *raw, return ret; } -struct json *json_parse_len(const char *str, size_t size) { +struct json *json_parse(const char *str) { + return json_parse_len(strlen(str), str); +} + +struct json *json_parse_len(size_t size, const char str[size]) { if (!str || size == 0) return NULL; struct json *json = NULL; |