From eece8c85564b9c5ae0cb3edfe7edb684242e9227 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 18 Jan 2021 10:30:17 -0800 Subject: More static analyzer cleanup, including switching to use bools where appropriate and EXIT_SUCESS/EXIT_FAILURE --- json.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'json.c') diff --git a/json.c b/json.c index 6ec9fcd..18b1fa6 100644 --- a/json.c +++ b/json.c @@ -4,17 +4,17 @@ #include -#include "types.h" +#include "json.h" __attribute__((nonnull)) -static int _json_match(const char *text, match_t *m, int comma, unsigned int verbose); +static int _json_match(const char *text, match_t *m, int comma, bool verbose); // // Helper function for json_match(). // `comma` is used to track whether a comma will need to be printed before the // next object or not. // -static int _json_match(const char *text, match_t *m, int comma, unsigned int verbose) +static int _json_match(const char *text, match_t *m, int comma, bool verbose) { if (!verbose) { if (m->pat->type != BP_REF) { @@ -49,7 +49,7 @@ static int _json_match(const char *text, match_t *m, int comma, unsigned int ver // // Print a match object as a JSON object. // -void json_match(const char *text, match_t *m, unsigned int verbose) +void json_match(const char *text, match_t *m, bool verbose) { (void)_json_match(text, m, 0, verbose); } -- cgit v1.2.3