]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
json: remove unused jansson wrappers 5738/head
authorVictor Julien <victor@inliniac.net>
Mon, 18 Jan 2021 06:57:39 +0000 (07:57 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 18 Jan 2021 06:57:39 +0000 (07:57 +0100)
src/output-json.c
src/output-json.h
src/suricata-common.h

index 11c3d59f1e1870c7d8336989ec384c61e74f4cc8..064d15d21de53e8315620fcb07035138203938a1 100644 (file)
@@ -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){
index cca913a0a97760572d51de5d890068ae47c2fda1..3e8d5b8931cb6a22b37f9d4ed53009eee383bb7e 100644 (file)
@@ -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);
index 967849ac91a018395008f43d0c05eea0378df4f6..160cde8173a353352fb9bf90eb37ad1b76836000 100644 (file)
@@ -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 <magic.h>