aboutsummaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-18 10:30:17 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-18 10:30:17 -0800
commiteece8c85564b9c5ae0cb3edfe7edb684242e9227 (patch)
treea3de972d08072bd4e7d5b626693ae174542cc58e /json.c
parent7f0c3804dce7591332bbf6bd0922597ea675df44 (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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/json.c b/json.c
index 6ec9fcd..18b1fa6 100644
--- a/json.c
+++ b/json.c
@@ -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);
}