diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 10:30:17 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 10:30:17 -0800 |
| commit | eece8c85564b9c5ae0cb3edfe7edb684242e9227 (patch) | |
| tree | a3de972d08072bd4e7d5b626693ae174542cc58e /json.c | |
| parent | 7f0c3804dce7591332bbf6bd0922597ea675df44 (diff) | |
More static analyzer cleanup, including switching to use bools where
appropriate and EXIT_SUCESS/EXIT_FAILURE
Diffstat (limited to 'json.c')
| -rw-r--r-- | json.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,17 +4,17 @@ #include <stdio.h> -#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); } |
