From: Victor Julien Date: Mon, 18 Jan 2021 06:57:39 +0000 (+0100) Subject: json: remove unused jansson wrappers X-Git-Tag: suricata-7.0.0-beta1~1861 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5738%2Fhead;p=thirdparty%2Fsuricata.git json: remove unused jansson wrappers --- diff --git a/src/output-json.c b/src/output-json.c index 11c3d59f1e..064d15d21d 100644 --- a/src/output-json.c +++ b/src/output-json.c @@ -96,20 +96,6 @@ void OutputJsonRegister (void) traffic_label_prefix_len = strlen(TRAFFIC_LABEL_PREFIX); } -json_t *SCJsonBool(int val) -{ - return (val ? json_true() : json_false()); -} - -/** - * Wrap json_decref. This is mainly to expose this function to Rust as its - * defined in the Jansson header file as an inline function. - */ -void SCJsonDecref(json_t *json) -{ - json_decref(json); -} - json_t *SCJsonString(const char *val) { if (val == NULL){ diff --git a/src/output-json.h b/src/output-json.h index cca913a0a9..3e8d5b8931 100644 --- a/src/output-json.h +++ b/src/output-json.h @@ -112,9 +112,7 @@ typedef struct OutputJsonThreadCtx_ { MemBuffer *buffer; } OutputJsonThreadCtx; -json_t *SCJsonBool(int val); json_t *SCJsonString(const char *val); -void SCJsonDecref(json_t *js); void EveAddCommonOptions(const OutputJsonCommonSettings *cfg, const Packet *p, const Flow *f, JsonBuilder *js); diff --git a/src/suricata-common.h b/src/suricata-common.h index 967849ac91..160cde8173 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -257,11 +257,6 @@ typedef unsigned char u_char #ifndef JSON_ESCAPE_SLASH #define JSON_ESCAPE_SLASH 0 #endif -/* Appears not all current distros have jansson that defines this. */ -#ifndef json_boolean -#define json_boolean(val) SCJsonBool((val)) -//#define json_boolean(val) ((val) ? json_true() : json_false()) -#endif #ifdef HAVE_MAGIC #include