]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
style: remove some useless return
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 15 May 2024 13:06:39 +0000 (15:06 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 31 May 2024 11:11:09 +0000 (13:11 +0200)
and remove empty line before end of function

112 files changed:
src/app-layer-expectation.c
src/app-layer-ftp.c
src/app-layer-htp-mem.c
src/app-layer-htp.c
src/app-layer-parser.c
src/app-layer-smb.c
src/app-layer-smtp.c
src/app-layer-ssl.c
src/app-layer.c
src/conf-yaml-loader.c
src/conf.c
src/counters.c
src/decode-icmpv6.c
src/decode-ipv6.c
src/decode.c
src/defrag-config.c
src/defrag-hash.c
src/detect-app-layer-protocol.c
src/detect-byte-extract.c
src/detect-csum.c
src/detect-datarep.c
src/detect-dataset.c
src/detect-engine-address-ipv6.c
src/detect-engine-address.c
src/detect-engine-alert.c
src/detect-engine-analyzer.c
src/detect-engine-build.c
src/detect-engine-iponly.c
src/detect-engine-mpm.c
src/detect-engine-payload.c
src/detect-engine-port.c
src/detect-engine-siggroup.c
src/detect-engine-sigorder.c
src/detect-engine-state.c
src/detect-engine.c
src/detect-fast-pattern.c
src/detect-filemagic.c
src/detect-filemd5.c
src/detect-filename.c
src/detect-filesha1.c
src/detect-filesha256.c
src/detect-http2.c
src/detect-icmpv4hdr.c
src/detect-icmpv6-mtu.c
src/detect-icmpv6hdr.c
src/detect-ipproto.c
src/detect-ipv4hdr.c
src/detect-ipv6hdr.c
src/detect-lua.c
src/detect-parse.c
src/detect-pcre.c
src/detect-ssl-state.c
src/detect-tcphdr.c
src/detect-tcpmss.c
src/detect-template2.c
src/detect-tos.c
src/detect-ttl.c
src/detect-udphdr.c
src/detect.c
src/flow-manager.c
src/flow-timeout.c
src/flow.c
src/host.c
src/ippair.c
src/log-pcap.c
src/output-json-email-common.c
src/reputation.c
src/runmode-af-packet.c
src/runmode-af-xdp.c
src/runmode-erf-dag.c
src/runmode-erf-file.c
src/runmode-ipfw.c
src/runmode-netmap.c
src/runmode-nflog.c
src/runmode-nfq.c
src/runmode-pcap-file.c
src/runmode-pcap.c
src/runmode-pfring.c
src/runmodes.c
src/stream-tcp-reassemble.c
src/stream-tcp.c
src/tm-threads.c
src/tmqh-flow.c
src/tmqh-packetpool.c
src/unix-manager.c
src/util-affinity.c
src/util-atomic.c
src/util-buffer.c
src/util-classification-config.c
src/util-debug-filters.c
src/util-debug.c
src/util-ebpf.c
src/util-host-os-info.c
src/util-ip.c
src/util-landlock.c
src/util-macset.c
src/util-mpm-ac.c
src/util-mpm-hs.c
src/util-napatech.c
src/util-pool.c
src/util-port-interval-tree.c
src/util-print.c
src/util-profiling-locks.c
src/util-proto-name.c
src/util-radix-tree.c
src/util-reference-config.c
src/util-rule-vars.c
src/util-signal.c
src/util-streaming-buffer.c
src/util-thash.c
src/util-threshold-config.c
src/util-unittest.c

index 7a456f87a336338162ca1a1b6adb3c5bb7ae9688..6635054268a6b607d7040a90b24426c451b7929c 100644 (file)
@@ -386,7 +386,6 @@ void AppLayerExpectationClean(Flow *f)
 out:
     if (ipp)
         IPPairRelease(ipp);
-    return;
 }
 
 /**
index 7384e732e53376098d6cd53550a7025eebc4e03e..f76b6dd4cba679467a16817f1247a1a7a28e4f29 100644 (file)
@@ -154,14 +154,12 @@ static void FTPParseMemcap(void)
 
 static void FTPIncrMemuse(uint64_t size)
 {
-    (void) SC_ATOMIC_ADD(ftp_memuse, size);
-    return;
+    (void)SC_ATOMIC_ADD(ftp_memuse, size);
 }
 
 static void FTPDecrMemuse(uint64_t size)
 {
-    (void) SC_ATOMIC_SUB(ftp_memuse, size);
-    return;
+    (void)SC_ATOMIC_SUB(ftp_memuse, size);
 }
 
 uint64_t FTPMemuseGlobalCounter(void)
@@ -291,8 +289,6 @@ static void FTPLocalStorageFree(void *ptr)
 
         SCFree(td);
     }
-
-    return;
 }
 static FTPTransaction *FTPTransactionCreate(FtpState *state)
 {
index 57967b1d6e4e2f22b042997d52a2caf674b30e12..2825b6be7ccb687bebd05236dff47197a59aba18 100644 (file)
@@ -70,14 +70,12 @@ void HTPParseMemcap(void)
 
 static void HTPIncrMemuse(uint64_t size)
 {
-    (void) SC_ATOMIC_ADD(htp_memuse, size);
-    return;
+    (void)SC_ATOMIC_ADD(htp_memuse, size);
 }
 
 static void HTPDecrMemuse(uint64_t size)
 {
-    (void) SC_ATOMIC_SUB(htp_memuse, size);
-    return;
+    (void)SC_ATOMIC_SUB(htp_memuse, size);
 }
 
 uint64_t HTPMemuseGlobalCounter(void)
index c4df1d93dc0d79413465237c2fb2ecc29c69a9e5..b5c0dfd64bc957968f713e94991d383c0a6a68c2 100644 (file)
@@ -2550,10 +2550,8 @@ static void HTPConfigSetDefaultsPhase1(HTPCfgRec *cfg_prec)
      * config, we have to set the soft limit as well. If libhtp starts using
      * the soft limit in the future, we at least make sure we control what
      * it's value is. */
-    htp_config_set_field_limits(cfg_prec->cfg,
-            (size_t)HTP_CONFIG_DEFAULT_FIELD_LIMIT_SOFT,
+    htp_config_set_field_limits(cfg_prec->cfg, (size_t)HTP_CONFIG_DEFAULT_FIELD_LIMIT_SOFT,
             (size_t)HTP_CONFIG_DEFAULT_FIELD_LIMIT_HARD);
-    return;
 }
 
 /* hack: htp random range code expects random values in range of 0-RAND_MAX,
@@ -2609,7 +2607,6 @@ static void HTPConfigSetDefaultsPhase2(const char *name, HTPCfgRec *cfg_prec)
     }
 
     htp_config_register_request_line(cfg_prec->cfg, HTPCallbackRequestLine);
-    return;
 }
 
 static void HTPConfigParseParameters(HTPCfgRec *cfg_prec, ConfNode *s,
@@ -2990,8 +2987,6 @@ static void HTPConfigParseParameters(HTPCfgRec *cfg_prec, ConfNode *s,
                     p->name);
         }
     } /* TAILQ_FOREACH(p, &default_config->head, next) */
-
-    return;
 }
 
 void HTPConfigure(void)
@@ -3318,15 +3313,11 @@ static HTPCfgRec cfglist_backup;
 void HtpConfigCreateBackup(void)
 {
     cfglist_backup = cfglist;
-
-    return;
 }
 
 void HtpConfigRestoreBackup(void)
 {
     cfglist = cfglist_backup;
-
-    return;
 }
 
 /** \test Test case where chunks are sent in smaller chunks and check the
index a1f000f90c2586e7329d363b249ea1226894775c..428bae864b34dd3cef37eab70290394ee3a2b16a 100644 (file)
@@ -1781,7 +1781,6 @@ void AppLayerParserRegisterProtocolParsers(void)
     }
 
     ValidateParsers();
-    return;
 }
 
 
index 0c6102e83e5f846ad955debccbfadd914f273d14..2cc67f9146afc44cd241d0c69a83ace84d9ffe3b 100644 (file)
@@ -50,8 +50,6 @@ void RegisterSMBParsers(void)
 #ifdef UNITTESTS
     AppLayerParserRegisterProtocolUnittests(IPPROTO_TCP, ALPROTO_SMB, SMBParserRegisterTests);
 #endif
-
-    return;
 }
 
 #ifdef UNITTESTS
index 944187aa4df7f29cc712e68c38af3af3e379b109..3558ff0009c5de26fde96a75848599070970cbda 100644 (file)
@@ -1591,8 +1591,6 @@ static void SMTPLocalStorageFree(void *ptr)
 
         SCFree(td);
     }
-
-    return;
 }
 
 static void SMTPTransactionFree(SMTPTransaction *tx, SMTPState *state)
@@ -1645,8 +1643,6 @@ static void SMTPStateFree(void *p)
     }
 
     SCFree(smtp_state);
-
-    return;
 }
 
 static void SMTPSetMpmState(void)
@@ -1667,7 +1663,6 @@ static void SMTPSetMpmState(void)
     }
 
     mpm_table[SMTP_MPM].Prepare(smtp_mpm_ctx);
-
 }
 
 static void SMTPFreeMpmState(void)
@@ -1783,7 +1778,6 @@ static void *SMTPStateGetTx(void *state, uint64_t id)
         }
     }
     return NULL;
-
 }
 
 static int SMTPStateGetAlstateProgress(void *vtx, uint8_t direction)
@@ -1904,7 +1898,6 @@ void RegisterSMTPParsers(void)
 #ifdef UNITTESTS
     AppLayerParserRegisterProtocolUnittests(IPPROTO_TCP, ALPROTO_SMTP, SMTPParserRegisterTests);
 #endif
-    return;
 }
 
 /**
@@ -4258,6 +4251,4 @@ void SMTPParserRegisterTests(void)
     UtRegisterTest("SMTPParserTest13", SMTPParserTest13);
     UtRegisterTest("SMTPParserTest14", SMTPParserTest14);
 #endif /* UNITTESTS */
-
-    return;
 }
index 1cf81b8a52a40e928ff913a4c5002f2a85fd13a6..21797d678847cff50f303745f6e66b6201c8528f 100644 (file)
@@ -2931,8 +2931,6 @@ static void SSLStateFree(void *p)
     TAILQ_INIT(&ssl_state->client_connp.certs);
 
     SCFree(ssl_state);
-
-    return;
 }
 
 static void SSLStateTransactionFree(void *state, uint64_t tx_id)
@@ -3327,8 +3325,6 @@ void RegisterSSLParsers(void)
     } else {
         SCLogConfig("Parser disabled for %s protocol. Protocol detection still on.", proto_name);
     }
-
-    return;
 }
 
 /**
index b2b720d5f57626a9e7b3bf38ef8a7a9586b618e9..a7e50d66d024af9259b989319abb9b3e3349bc3a 100644 (file)
@@ -354,7 +354,6 @@ static void TCPProtoDetectCheckBailConditions(ThreadVars *tv,
 
 failure:
     DisableAppLayer(tv, f, p);
-    return;
 }
 
 static int TCPProtoDetectTriggerOpposingSide(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
index 463eb2e5823ccb000c8f4ea88f75885599f4a7a5..f8b9ae21232a7bf5e20d2e631d03dd2337fcb56c 100644 (file)
@@ -71,8 +71,6 @@ Mangle(char *string)
 
     while ((c = strchr(string, '_')))
         *c = '-';
-
-    return;
 }
 
 /**
index e232eb61221d1d8fc4973d0bb18185760273b59b..3cb9fd0801ae26fc79eb15342cde1b06db1e47d2 100644 (file)
@@ -456,7 +456,6 @@ int ConfGetChildValueInt(const ConfNode *base, const char *name, intmax_t *val)
 
     *val = tmpint;
     return 1;
-
 }
 
 int ConfGetChildValueIntWithDefault(const ConfNode *base, const ConfNode *dflt,
@@ -671,8 +670,6 @@ void ConfCreateContextBackup(void)
 {
     root_backup = root;
     root = NULL;
-
-    return;
 }
 
 /**
@@ -683,8 +680,6 @@ void ConfRestoreContextBackup(void)
 {
     root = root_backup;
     root_backup = NULL;
-
-    return;
 }
 
 /**
index 36172d913d15cef4c7ccb2fae225e0f299173b3c..f6014d096c5250266f856e4fc1ce0bfc6bc963ae 100644 (file)
@@ -155,7 +155,6 @@ void StatsAddUI64(ThreadVars *tv, uint16_t id, uint64_t x)
 #endif
     pca->head[id].value += x;
     pca->head[id].updates++;
-    return;
 }
 
 /**
@@ -176,7 +175,6 @@ void StatsIncr(ThreadVars *tv, uint16_t id)
 #endif
     pca->head[id].value++;
     pca->head[id].updates++;
-    return;
 }
 
 /**
@@ -197,7 +195,6 @@ void StatsDecr(ThreadVars *tv, uint16_t id)
 #endif
     pca->head[id].value--;
     pca->head[id].updates++;
-    return;
 }
 
 /**
@@ -225,8 +222,6 @@ void StatsSetUI64(ThreadVars *tv, uint16_t id, uint64_t x)
     }
 
     pca->head[id].updates++;
-
-    return;
 }
 
 static ConfNode *GetConfig(void) {
@@ -370,8 +365,6 @@ static void StatsReleaseCtx(void)
     }
     memset(&stats_table, 0, sizeof(stats_table));
     SCMutexUnlock(&stats_table_mutex);
-
-    return;
 }
 
 /**
@@ -568,8 +561,6 @@ static void StatsReleaseCounter(StatsCounter *pc)
     if (pc != NULL) {
         SCFree(pc);
     }
-
-    return;
 }
 
 /**
@@ -653,7 +644,6 @@ static void StatsCopyCounterValue(StatsLocalCounter *pcae)
 
     pc->value = pcae->value;
     pc->updates = pcae->updates;
-    return;
 }
 
 /**
index 4c2a6836fc54a426bb2a24fc2b8e73160b6d0820..b85bed2c4aa9705fbe7dc64652121dd326ec7bf4 100644 (file)
@@ -139,8 +139,6 @@ static void DecodePartialIPV6(Packet *p, uint8_t *partial_packet, uint16_t len )
                s, d, IPV6_GET_RAW_CLASS(icmp6_ip6h), IPV6_GET_RAW_FLOW(icmp6_ip6h),
                IPV6_GET_RAW_NH(icmp6_ip6h), IPV6_GET_RAW_PLEN(icmp6_ip6h), IPV6_GET_RAW_HLIM(icmp6_ip6h));
 #endif
-
-    return;
 }
 
 /** \retval type counterpart type or -1 */
index dfc2448389608c74a85f306f180a10308574f614..c732d7938d3ba470eb65af05cc939d0ab08d9d18 100644 (file)
@@ -59,7 +59,6 @@ static void DecodeIPv4inIPv6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, c
     } else {
         ENGINE_SET_EVENT(p, IPV4_IN_IPV6_WRONG_IP_VER);
     }
-    return;
 }
 
 /**
index f74737ed2cddbba40153baa7fc9fb595d3731bd8..3eefbcbcb7db49dbb80c0fb401ece2cf5152031e 100644 (file)
@@ -731,8 +731,6 @@ void DecodeRegisterPerfCounters(DecodeThreadVars *dtv, ThreadVars *tv)
                     DEvents[i].event_name, tv);
         }
     }
-
-    return;
 }
 
 void DecodeUpdatePacketCounters(ThreadVars *tv,
index 5054ec289bc4d258356810358e3399750fb640ea..1574a9367f6ce5694a691ce83bb6d09fce4ce9ba 100644 (file)
@@ -36,8 +36,6 @@ static void DefragPolicyFreeUserData(void *data)
 {
     if (data != NULL)
         SCFree(data);
-
-    return;
 }
 
 static void DefragPolicyAddHostInfo(char *host_ip_range, uint64_t timeout)
index 54e86b9e086e219dabfed4886da1422d312b3c0f..afd1aeeea03fec81e5dce6dfc20160330fabfa24 100644 (file)
@@ -288,8 +288,6 @@ void DefragInitConfig(bool quiet)
         SCLogConfig("defrag memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
                 SC_ATOMIC_GET(defrag_memuse), SC_ATOMIC_GET(defrag_config.memcap));
     }
-
-    return;
 }
 
 /** \brief print some defrag stats
@@ -331,7 +329,6 @@ void DefragHashShutdown(void)
     }
     (void) SC_ATOMIC_SUB(defrag_memuse, defrag_config.hash_size * sizeof(DefragTrackerHashRow));
     DefragTrackerQueueDestroy(&defragtracker_spare_q);
-    return;
 }
 
 /** \brief compare two raw ipv6 addrs
index 744321b743a685fdb1deb78928d8d6e1147b9528..cdef7db532c4185710b5b4f3f38ceec1576d1ab0 100644 (file)
@@ -228,7 +228,6 @@ error:
 static void DetectAppLayerProtocolFree(DetectEngineCtx *de_ctx, void *ptr)
 {
     SCFree(ptr);
-    return;
 }
 
 /** \internal
@@ -352,8 +351,7 @@ void DetectAppLayerProtocolRegister(void)
     sigmatch_table[DETECT_AL_APP_LAYER_PROTOCOL].SetupPrefilter =
         PrefilterSetupAppProto;
     sigmatch_table[DETECT_AL_APP_LAYER_PROTOCOL].SupportsPrefilter =
-        PrefilterAppProtoIsPrefilterable;
-    return;
+            PrefilterAppProtoIsPrefilterable;
 }
 
 /**********************************Unittests***********************************/
index 117cce5975343d01d47dff5eeff595d25a08da48..5b64ed915c953cb06c3dd521216871cb1337a3a2 100644 (file)
@@ -644,8 +644,6 @@ static void DetectByteExtractFree(DetectEngineCtx *de_ctx, void *ptr)
             SCFree((void *)bed->name);
         SCFree(bed);
     }
-
-    return;
 }
 
 /**
index c3f3ffd62607ac327c9bc4327ec23dbffd442867..180a0b84b6af3f7780feec75603962825ed4baac 100644 (file)
@@ -304,8 +304,6 @@ static void DetectIPV4CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /**
@@ -394,8 +392,6 @@ static void DetectTCPV4CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /**
@@ -485,8 +481,6 @@ static void DetectTCPV6CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /**
@@ -578,8 +572,6 @@ static void DetectUDPV4CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /**
@@ -668,8 +660,6 @@ static void DetectUDPV6CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /**
@@ -758,8 +748,6 @@ static void DetectICMPV4CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /**
@@ -853,8 +841,6 @@ static void DetectICMPV6CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
     if (cd != NULL)
         SCFree(cd);
-
-    return;
 }
 
 /* ---------------------------------- Unit Tests --------------------------- */
index 5b959b4023a3c594afa6c1506c43890bf177ff68..325046786de6dc31c949a0ffc7a25a0e75a99f9c 100644 (file)
@@ -238,7 +238,6 @@ static void GetDirName(const char *in, char *out, size_t outs)
     char *dir = dirname(tmp);
     BUG_ON(dir == NULL);
     strlcpy(out, dir, outs);
-    return;
 }
 
 static int SetupLoadPath(const DetectEngineCtx *de_ctx,
index 70e9e67c946dae4320fe826284cbdb6f3e8912ba..1fc145267fd3cd2e88b3bd3cd560baf812c3d0be 100644 (file)
@@ -252,7 +252,6 @@ static void GetDirName(const char *in, char *out, size_t outs)
     char *dir = dirname(tmp);
     BUG_ON(dir == NULL);
     strlcpy(out, dir, outs);
-    return;
 }
 
 static int SetupLoadPath(const DetectEngineCtx *de_ctx,
index 3179628c6d551b0e57d56cd8811b623ef8e60625..4728662e0a75ab01cf556ce41723aefe4bcb0947 100644 (file)
@@ -296,8 +296,6 @@ static void AddressCutIPv6CopySubOne(uint32_t *a, uint32_t *b)
     b[1] = htonl(b[1]);
     b[2] = htonl(b[2]);
     b[3] = htonl(b[3]);
-
-    return;
 }
 
 /**
@@ -334,8 +332,6 @@ static void AddressCutIPv6CopyAddOne(uint32_t *a, uint32_t *b)
     b[1] = htonl(b[1]);
     b[2] = htonl(b[2]);
     b[3] = htonl(b[3]);
-
-    return;
 }
 
 /**
@@ -352,8 +348,6 @@ static void AddressCutIPv6Copy(uint32_t *a, uint32_t *b)
     b[1] = htonl(a[1]);
     b[2] = htonl(a[2]);
     b[3] = htonl(a[3]);
-
-    return;
 }
 
 int DetectAddressCutIPv6(DetectEngineCtx *de_ctx, DetectAddress *a,
@@ -1922,6 +1916,4 @@ void DetectAddressIPv6Tests(void)
     UtRegisterTest("AddressTestIPv6CutNot04", AddressTestIPv6CutNot04);
     UtRegisterTest("AddressTestIPv6CutNot05", AddressTestIPv6CutNot05);
 #endif /* UNITTESTS */
-
-    return;
 }
index 664eaf569bbb8e7ef785b2c4a3a8c3286a59ca04..fb649c1df700b814e2485582c83f8e8399e63254 100644 (file)
@@ -85,7 +85,6 @@ void DetectAddressFree(DetectAddress *ag)
         return;
 
     SCFree(ag);
-    return;
 }
 
 /**
@@ -1342,7 +1341,6 @@ void DetectAddressMapFree(DetectEngineCtx *de_ctx)
 
     HashListTableFree(de_ctx->address_table);
     de_ctx->address_table = NULL;
-    return;
 }
 
 static bool DetectAddressMapAdd(DetectEngineCtx *de_ctx, const char *string,
@@ -1487,8 +1485,6 @@ void DetectAddressHeadCleanup(DetectAddressHead *gh)
             gh->ipv6_head = NULL;
         }
     }
-
-    return;
 }
 
 /**
@@ -1787,8 +1783,6 @@ static void DetectAddressPrint(DetectAddress *gr)
         SCLogDebug("%s/%s", ip, mask);
 //        printf("%s/%s", ip, mask);
     }
-
-    return;
 }
 #endif
 
index 2ef1e19ca55355b52b48afb84ef295ea49e09c59..e0854c3782af7373dbb69e0934afddad79148ee9 100644 (file)
@@ -303,7 +303,6 @@ void AlertQueueAppend(DetectEngineThreadCtx *det_ctx, const Signature *s, Packet
 
     SCLogDebug("Appending sid %" PRIu32 ", s->num %" PRIu32 " to alert queue", s->id, s->num);
     det_ctx->alert_queue_size++;
-    return;
 }
 
 /** \internal
index 5e5d29e92f41fb4d69b09d37255c62202e5de5ec..0ce0dbc4e810594559266582404841a9a1a0cea8 100644 (file)
@@ -285,7 +285,6 @@ void EngineAnalysisFP(const DetectEngineCtx *de_ctx, const Signature *s, char *l
     SCFree(pat);
 
     fprintf(fp, "\n");
-    return;
 }
 
 /**
@@ -456,8 +455,6 @@ static void CleanupFPAnalyzer(DetectEngineCtx *de_ctx)
 
     fclose(de_ctx->ea->rule_engine_analysis_fp);
     de_ctx->ea->rule_engine_analysis_fp = NULL;
-
-    return;
 }
 
 static void CleanupRuleAnalyzer(DetectEngineCtx *de_ctx)
@@ -617,8 +614,6 @@ static void EngineAnalysisRulesPrintFP(const DetectEngineCtx *de_ctx, const Sign
         fprintf(ea_ctx->rule_engine_analysis_fp, "(with %d transform(s)) ", bt->transforms.cnt);
     }
     fprintf(ea_ctx->rule_engine_analysis_fp, "buffer.\n");
-
-    return;
 }
 
 void EngineAnalysisRulesFailure(const DetectEngineCtx *de_ctx, char *line, char *file, int lineno)
@@ -1830,5 +1825,4 @@ void EngineAnalysisRules(const DetectEngineCtx *de_ctx,
         }
         fprintf(fp, "\n");
     }
-    return;
 }
index d150ddfba59631e733164c35d323c5adad1e255b..f28b0219cc4571cb03aff6be8f977d57af25496f 100644 (file)
@@ -955,7 +955,6 @@ static void RulesDumpGrouping(const DetectEngineCtx *de_ctx,
     fprintf(fp, "%s\n", js_s);
     free(js_s);
     fclose(fp);
-    return;
 }
 
 static int RulesGroupByProto(DetectEngineCtx *de_ctx)
index b4d8b86aa18ec543a7890dd7ed5562e1a8e692f1..0cbd1b296f709e8c0415cc5f9efea976f5ff9d48 100644 (file)
@@ -2537,7 +2537,4 @@ void IPOnlyRegisterTests(void)
     UtRegisterTest("IPOnlyTestBug5168v1", IPOnlyTestBug5168v1);
     UtRegisterTest("IPOnlyTestBug5168v2", IPOnlyTestBug5168v2);
 #endif
-
-    return;
 }
-
index f1b302abcebe98b57b6a60d191e39e9bc065723e..eca9807df1b85543b2bafd88a77bf54ce8159bf5 100644 (file)
@@ -994,8 +994,6 @@ static void PopulateMpmHelperAddPattern(MpmCtx *mpm_ctx, const DetectContentData
                             cd->id, s->num, flags|MPM_PATTERN_CTX_OWNS_ID);
         }
     }
-
-    return;
 }
 
 #define SGH_PROTO(sgh, p) ((sgh)->init->protos[(p)] == 1)
@@ -1027,7 +1025,6 @@ static void SetMpm(Signature *s, SigMatch *mpm_sm, const int mpm_sm_list)
     cd->flags |= DETECT_CONTENT_MPM;
     s->init_data->mpm_sm_list = mpm_sm_list;
     s->init_data->mpm_sm = mpm_sm;
-    return;
 }
 
 static SigMatch *GetMpmForList(const Signature *s, SigMatch *list, SigMatch *mpm_sm,
@@ -1269,7 +1266,6 @@ void RetrieveFPForSig(const DetectEngineCtx *de_ctx, Signature *s)
 #endif
     /* assign to signature */
     SetMpm(s, mpm_sm, mpm_sm_list);
-    return;
 }
 
 /** \internal
@@ -1529,7 +1525,6 @@ void MpmStoreFree(DetectEngineCtx *de_ctx)
 
     HashListTableFree(de_ctx->mpm_hash_table);
     de_ctx->mpm_hash_table = NULL;
-    return;
 }
 
 static void MpmStoreSetup(const DetectEngineCtx *de_ctx, MpmStore *ms)
index 7fc4c0e161d4ec667e5174f0dddd6622f721b6ac..4154a093dca354fea31fe74574c60786dd0cf44f 100644 (file)
@@ -1179,6 +1179,4 @@ void PayloadRegisterTests(void)
     UtRegisterTest("PayloadTestSig33", PayloadTestSig33);
     UtRegisterTest("PayloadTestSig34", PayloadTestSig34);
 #endif /* UNITTESTS */
-
-    return;
 }
index 263e7c30a91ac807c78306492b30b01693422381..4b0031d20017cd33c8b3cb12b4fdb615d7da19e1 100644 (file)
@@ -1425,8 +1425,6 @@ void DetectPortHashFree(DetectEngineCtx *de_ctx)
 
     HashListTableFree(de_ctx->dport_hash_table);
     de_ctx->dport_hash_table = NULL;
-
-    return;
 }
 
 /*---------------------- Unittests -------------------------*/
@@ -2374,4 +2372,3 @@ void DetectPortTests(void)
 }
 
 #endif /* UNITTESTS */
-
index e483c918b4412d94ec296f4953c1bbd2c5819cb7..49982f028b2871a88af2ab7604c12e53605af97f 100644 (file)
@@ -185,8 +185,6 @@ void SigGroupHeadFree(const DetectEngineCtx *de_ctx, SigGroupHead *sgh)
 
     PrefilterCleanupRuleGroup(de_ctx, sgh);
     SCFree(sgh);
-
-    return;
 }
 
 /**
@@ -316,8 +314,6 @@ void SigGroupHeadHashFree(DetectEngineCtx *de_ctx)
 
     HashListTableFree(de_ctx->sgh_hash_table);
     de_ctx->sgh_hash_table = NULL;
-
-    return;
 }
 
 /**
@@ -471,7 +467,6 @@ void SigGroupHeadSetSigCnt(SigGroupHead *sgh, uint32_t max_idx)
     }
     sgh->init->sig_cnt = cnt;
 #endif
-    return;
 }
 
 /**
@@ -622,8 +617,6 @@ void SigGroupHeadSetupFiles(const DetectEngineCtx *de_ctx, SigGroupHead *sgh)
             sgh->filestore_cnt++;
         }
     }
-
-    return;
 }
 
 /** \brief build an array of rule id's for sigs with no prefilter
index ea51e191ecee504a3f9836efb2489d91f2e957ad..28bfd71569dcae4f12d3ca1f8cda0456907fe311 100644 (file)
@@ -109,8 +109,6 @@ static void SCSigRegisterSignatureOrderingFunc(DetectEngineCtx *de_ctx,
         de_ctx->sc_sig_order_funcs = temp;
     else
         prev->next = temp;
-
-    return;
 }
 
 /**
index aead3547e87e78ab1edfd5fb90c927db99c3b793..3a9067ce89820aa23f246caee5f131eab3ba8911 100644 (file)
@@ -181,15 +181,11 @@ void DetectEngineStateFree(DetectEngineState *state)
         }
     }
     SCFree(state);
-
-    return;
 }
 
 static void StoreFileNoMatchCnt(DetectEngineState *de_state, uint16_t file_no_match, uint8_t direction)
 {
     de_state->dir_state[(direction & STREAM_TOSERVER) ? 0 : 1].filestore_cnt += file_no_match;
-
-    return;
 }
 
 static bool StoreFilestoreSigsCantMatch(const SigGroupHead *sgh, const DetectEngineState *de_state, uint8_t direction)
@@ -1458,8 +1454,6 @@ void DeStateRegisterTests(void)
     UtRegisterTest("DeStateSigTest09", DeStateSigTest09);
     UtRegisterTest("DeStateSigTest10", DeStateSigTest10);
 #endif
-
-    return;
 }
 
 /**
index 4f66560fa85fe5bb95c15ad59de0bb734446464d..995d285f748996d8780e1d5eeb2c0d5413c3af7b 100644 (file)
@@ -991,7 +991,6 @@ static void DetectBufferTypeFree(void)
 
     HashListTableFree(g_buffer_type_hash);
     g_buffer_type_hash = NULL;
-    return;
 }
 #endif
 static int DetectBufferTypeAdd(const char *string)
@@ -2533,7 +2532,6 @@ error:
         DetectEngineCtxFree(de_ctx);
     }
     return NULL;
-
 }
 
 DetectEngineCtx *DetectEngineCtxInitStubForMT(void)
@@ -4938,8 +4936,6 @@ static void DetectEngineDeInitYamlConf(void)
 {
     ConfDeInit();
     ConfRestoreContextBackup();
-
-    return;
 }
 
 static int DetectEngineTest01(void)
@@ -5137,5 +5133,4 @@ void DetectEngineRegisterTests(void)
     UtRegisterTest("DetectEngineTest08", DetectEngineTest08);
     UtRegisterTest("DetectEngineTest09", DetectEngineTest09);
 #endif
-    return;
 }
index 52a7466551409724582869d91c5dd961f6f34162..1af1daeea3df01cc3ee979681a3c7e64e8dd38b7 100644 (file)
@@ -117,7 +117,6 @@ static void Add(SCFPSupportSMList **list, const int list_id, const int priority)
         new->next = ip->next;
         ip->next = new;
     }
-    return;
 }
 
 /**
index b7a737e6c7b7a5a50ea74504db46122da7b9ce50..bf2a1fc8ac3f079b942b244c15846a9856236df1 100644 (file)
@@ -126,8 +126,7 @@ void DetectFilemagicRegister(void)
     DetectBufferTypeSupportsMultiInstance("file.magic");
 
     g_file_magic_buffer_id = DetectBufferTypeGetByName("file.magic");
-       SCLogDebug("registering filemagic rule option");
-    return;
+    SCLogDebug("registering filemagic rule option");
 }
 
 #define FILEMAGIC_MIN_SIZE  512
index 9ea08803d8b8b6631a4776ba3381b6624bf0e423..12517df1031e41be39a2cfc4da475a8d04df5af1 100644 (file)
@@ -55,7 +55,6 @@ void DetectFileMd5Register(void)
     g_file_match_list_id = DetectBufferTypeRegister("files");
 
     SCLogDebug("registering filemd5 rule option");
-    return;
 }
 
 /**
index 10646f019f1a0e10612d81cd3ea63c12c45b3ca4..d8fcd351fc74e3eb7498285802f76304717472f6 100644 (file)
@@ -118,7 +118,6 @@ void DetectFilenameRegister(void)
     filehandler_table[DETECT_FILE_NAME].Callback = DetectEngineInspectFilename;
 
     DetectBufferTypeSupportsMultiInstance("file.name");
-    return;
 }
 
 static int DetectFileextSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str)
index 6eef33c60824a60bd27f71c79a94a072b6894dd1..069cd4b18bb429e8242a204f9920e1497fd2de87 100644 (file)
@@ -55,7 +55,6 @@ void DetectFileSha1Register(void)
     g_file_match_list_id = DetectBufferTypeRegister("files");
 
     SCLogDebug("registering filesha1 rule option");
-    return;
 }
 
 /**
index 3b41f42f95736d49e66626116b243a4a42467728..b9d2d36aa5880c0d5cf40fc6723edb68bac6053c 100644 (file)
@@ -56,7 +56,6 @@ void DetectFileSha256Register(void)
     g_file_match_list_id = DetectBufferTypeRegister("files");
 
     SCLogDebug("registering filesha256 rule option");
-    return;
 }
 
 /**
index 1e047e57cdc6c6d9fef6489419c3a5c15ee6ea57..113fb1af3f069ac7ba503d5e5d94f66700866446 100644 (file)
@@ -217,7 +217,6 @@ void DetectHttp2Register(void)
             "http2", ALPROTO_HTTP2, SIG_FLAG_TOCLIENT, 0, DetectEngineInspectGenericList, NULL);
 
     g_http2_match_buffer_id = DetectBufferTypeRegister("http2");
-    return;
 }
 
 /**
index 0d4e90675c5a471a03e02855b544c570e648e4fd..259fbdc2ecc61b46f3fa250166e0217918638421 100644 (file)
@@ -62,8 +62,6 @@ void DetectIcmpv4HdrRegister(void)
     DetectPktMpmRegister("icmpv4.hdr", 2, PrefilterGenericMpmPktRegister, GetData);
 
     DetectPktInspectEngineRegister("icmpv4.hdr", GetData, DetectEngineInspectPktBufferGeneric);
-
-    return;
 }
 
 /**
index d4f67ad4a7ce73ce1e7da31ff4918ee3e94eed72..8f5e21f1562b5c611a1f5a6568c63d48d9d0bd8e 100644 (file)
@@ -58,7 +58,6 @@ void DetectICMPv6mtuRegister(void)
 #endif
     sigmatch_table[DETECT_ICMPV6MTU].SupportsPrefilter = PrefilterIcmpv6mtuIsPrefilterable;
     sigmatch_table[DETECT_ICMPV6MTU].SetupPrefilter = PrefilterSetupIcmpv6mtu;
-    return;
 }
 
 // returns 0 on no mtu, and 1 if mtu
index 4eec2b939d988efc0dea36403600741b941b35b6..54f1cd35a04f7522771cea4faeaf073d988ead80 100644 (file)
@@ -66,10 +66,7 @@ void DetectICMPv6hdrRegister(void)
 
     DetectPktMpmRegister("icmpv6.hdr", 2, PrefilterGenericMpmPktRegister, GetData);
 
-    DetectPktInspectEngineRegister("icmpv6.hdr", GetData,
-            DetectEngineInspectPktBufferGeneric);
-
-    return;
+    DetectPktInspectEngineRegister("icmpv6.hdr", GetData, DetectEngineInspectPktBufferGeneric);
 }
 
 /**
index 31228fb1b64a3830736554a90347e176bc0a141c..8151a71f71011ad506abedc99726e245f21daef5 100644 (file)
@@ -441,8 +441,6 @@ void DetectIPProtoRemoveAllSMs(DetectEngineCtx *de_ctx, Signature *s)
         SigMatchFree(de_ctx, sm);
         sm = tmp_sm;
     }
-
-    return;
 }
 
 static void DetectIPProtoFree(DetectEngineCtx *de_ctx, void *ptr)
@@ -928,7 +926,6 @@ static int DetectIPProtoTestSetup15(void)
  end:
     SigFree(NULL, sig);
     return result;
-
 }
 
 static int DetectIPProtoTestSetup16(void)
@@ -966,7 +963,6 @@ static int DetectIPProtoTestSetup16(void)
  end:
     SigFree(NULL, sig);
     return result;
-
 }
 
 static int DetectIPProtoTestSetup17(void)
@@ -1004,7 +1000,6 @@ static int DetectIPProtoTestSetup17(void)
  end:
     SigFree(NULL, sig);
     return result;
-
 }
 
 static int DetectIPProtoTestSetup18(void)
@@ -1042,7 +1037,6 @@ static int DetectIPProtoTestSetup18(void)
  end:
     SigFree(NULL, sig);
     return result;
-
 }
 
 static int DetectIPProtoTestSetup19(void)
index 52dfa71f5046338e10a055271d8789b6fe75dbad..78fe0062ea462de8601a55962e43dab3ab35fa0a 100644 (file)
@@ -65,10 +65,7 @@ void DetectIpv4hdrRegister(void)
 
     DetectPktMpmRegister("ipv4.hdr", 2, PrefilterGenericMpmPktRegister, GetData);
 
-    DetectPktInspectEngineRegister("ipv4.hdr", GetData,
-            DetectEngineInspectPktBufferGeneric);
-
-    return;
+    DetectPktInspectEngineRegister("ipv4.hdr", GetData, DetectEngineInspectPktBufferGeneric);
 }
 
 /**
index 1616fb1eb8fe39e25a658684a7c0911bc7d3db60..2f5e79d33d4ebdcbfd7abe3d84a291d161c31e74 100644 (file)
@@ -65,10 +65,7 @@ void DetectIpv6hdrRegister(void)
 
     DetectPktMpmRegister("ipv6.hdr", 2, PrefilterGenericMpmPktRegister, GetData);
 
-    DetectPktInspectEngineRegister("ipv6.hdr", GetData,
-            DetectEngineInspectPktBufferGeneric);
-
-    return;
+    DetectPktInspectEngineRegister("ipv6.hdr", GetData, DetectEngineInspectPktBufferGeneric);
 }
 
 /**
index ffc5362054183dc1fd4a3dd3b2619fdaf65c2542..36f045f50394d78c794a57ade9b3c31b091dcdb6 100644 (file)
@@ -95,7 +95,6 @@ void DetectLuaRegister(void)
             DetectEngineInspectGenericList, NULL);
 
     SCLogDebug("registering lua rule option");
-    return;
 }
 
 /* Flags for DetectLuaThreadData. */
index 4d159a8832eed5307dd08c093631a3f0c87e9245..74082cf521ada824f5ac8eb5a5e0c4f71ba6dea9 100644 (file)
@@ -538,8 +538,6 @@ void SigMatchRemoveSMFromList(Signature *s, SigMatch *sm, int sm_list)
         sm->prev->next = sm->next;
     if (sm->next != NULL)
         sm->next->prev = sm->prev;
-
-    return;
 }
 
 /**
@@ -802,8 +800,6 @@ static void SigMatchTransferSigMatchAcrossLists(SigMatch *sm,
         sm->next = NULL;
         *dst_sm_list_tail = sm;
     }
-
-    return;
 }
 
 int SigMatchListSMBelongsTo(const Signature *s, const SigMatch *key_sm)
@@ -2350,8 +2346,6 @@ static void DetectParseDupSigFreeFunc(void *data)
 {
     if (data != NULL)
         SCFree(data);
-
-    return;
 }
 
 /**
@@ -2430,8 +2424,6 @@ void DetectParseDupSigHashFree(DetectEngineCtx *de_ctx)
         HashListTableFree(de_ctx->dup_sig_hash_table);
 
     de_ctx->dup_sig_hash_table = NULL;
-
-    return;
 }
 
 /**
index 6d20dd08bb5d335a53661576d5f1746418c5e72d..fdbd8fd87ad401000a7383c85036bd459d203e70 100644 (file)
@@ -154,8 +154,6 @@ void DetectPcreRegister (void)
         pcre2_use_jit = 0;
     }
 #endif
-
-    return;
 }
 
 /**
@@ -972,8 +970,6 @@ static void DetectPcreFree(DetectEngineCtx *de_ctx, void *ptr)
         VarNameStoreUnregister(pd->capids[i], pd->captypes[i]);
     }
     SCFree(pd);
-
-    return;
 }
 
 #ifdef UNITTESTS /* UNITTESTS */
@@ -2066,6 +2062,5 @@ static void DetectPcreRegisterTests(void)
 
     UtRegisterTest("DetectPcreParseHttpHost", DetectPcreParseHttpHost);
     UtRegisterTest("DetectPcreParseCaptureTest", DetectPcreParseCaptureTest);
-
 }
 #endif /* UNITTESTS */
index 888aeaef4d6e918cc2ed75826463ade46d475b92..1ad10cc387f41e02b0e32ca3434d6e3e2499d10f 100644 (file)
@@ -332,8 +332,6 @@ static void DetectSslStateFree(DetectEngineCtx *de_ctx, void *ptr)
 {
     if (ptr != NULL)
         SCFree(ptr);
-
-    return;
 }
 
 #ifdef UNITTESTS
index d5a29d093a09c2cedcb5d4af1d12455b8516cdc2..fd7df2f687d71e6a293934778c6d4ea2bb77237e 100644 (file)
@@ -65,10 +65,7 @@ void DetectTcphdrRegister(void)
 
     DetectPktMpmRegister("tcp.hdr", 2, PrefilterGenericMpmPktRegister, GetData);
 
-    DetectPktInspectEngineRegister("tcp.hdr", GetData,
-            DetectEngineInspectPktBufferGeneric);
-
-    return;
+    DetectPktInspectEngineRegister("tcp.hdr", GetData, DetectEngineInspectPktBufferGeneric);
 }
 
 /**
index b1a1ffd72a5098dac9c119e5c765c01741acaebb..5c7acdb2ffe3fedf9b9f5c4def90b117dd8eb367 100644 (file)
@@ -58,8 +58,6 @@ void DetectTcpmssRegister(void)
     sigmatch_table[DETECT_TCPMSS].Free = DetectTcpmssFree;
     sigmatch_table[DETECT_TCPMSS].SupportsPrefilter = PrefilterTcpmssIsPrefilterable;
     sigmatch_table[DETECT_TCPMSS].SetupPrefilter = PrefilterSetupTcpmss;
-
-    return;
 }
 
 /**
index 249831aaf77542859c0739eb5a54aa7e9d5d2abd..c38e9fe33fe7e70c9c23f4a87a77c71d849557c4 100644 (file)
@@ -58,8 +58,6 @@ void DetectTemplate2Register(void)
     sigmatch_table[DETECT_TEMPLATE2].Free = DetectTemplate2Free;
     sigmatch_table[DETECT_TEMPLATE2].SupportsPrefilter = PrefilterTemplate2IsPrefilterable;
     sigmatch_table[DETECT_TEMPLATE2].SetupPrefilter = PrefilterSetupTemplate2;
-
-    return;
 }
 
 /**
index aa5cc2090f43be0ec6a210498ca5d8b60a0a3edc..d4d2d2fe65cd5b156f2fb1d5d9d66e3bd7897e0d 100644 (file)
@@ -364,6 +364,5 @@ void DetectTosRegisterTests(void)
     UtRegisterTest("DetectTosTest09", DetectTosTest09);
     UtRegisterTest("DetectTosTest10", DetectTosTest10);
     UtRegisterTest("DetectTosTest12", DetectTosTest12);
-    return;
 }
 #endif
index e16dbf8581b616302f591036bd4d640ab09dab93..edc5b1b225a40a946afe9e5f1e1c30d0d5411bb2 100644 (file)
@@ -64,8 +64,6 @@ void DetectTtlRegister(void)
 #endif
     sigmatch_table[DETECT_TTL].SupportsPrefilter = PrefilterTtlIsPrefilterable;
     sigmatch_table[DETECT_TTL].SetupPrefilter = PrefilterSetupTtl;
-
-    return;
 }
 
 /**
index cfc91bc7a14f9065ab635ca2c429780b5a7861ff..9f6d16ebf0b0b17ec91af419ef6408a51ed633be 100644 (file)
@@ -64,9 +64,7 @@ void DetectUdphdrRegister(void)
 
     DetectPktMpmRegister("udp.hdr", 2, PrefilterGenericMpmPktRegister, GetData);
 
-    DetectPktInspectEngineRegister("udp.hdr", GetData,
-            DetectEngineInspectPktBufferGeneric);
-    return;
+    DetectPktInspectEngineRegister("udp.hdr", GetData, DetectEngineInspectPktBufferGeneric);
 }
 
 /**
index 6111d2ebfd952e81c7442d57be8539ba83b66047..989f1133daeba05f496f630e9a602306433d1b06 100644 (file)
@@ -1806,7 +1806,6 @@ static void DetectNoFlow(ThreadVars *tv,
 
     /* see if the packet matches one or more of the sigs */
     DetectRun(tv, de_ctx, det_ctx, p);
-    return;
 }
 
 /** \brief Detection engine thread wrapper.
@@ -1914,4 +1913,3 @@ void SigMatchSignatures(
 #ifdef UNITTESTS
 #include "tests/detect.c"
 #endif
-
index b1d073029cd0beba7f6ccff37ec45ef7d09430e1..cd124a3c45e9f65b9769a57c8755d320b1499d84 100644 (file)
@@ -166,7 +166,6 @@ again:
 
     /* reset count, so we can kill and respawn (unix socket) */
     SC_ATOMIC_SET(flowmgr_cnt, 0);
-    return;
 }
 
 /** \internal
@@ -949,7 +948,6 @@ void FlowManagerThreadSpawn(void)
             FatalError("flow manager thread spawn failed");
         }
     }
-    return;
 }
 
 typedef struct FlowRecyclerThreadData_ {
@@ -1150,7 +1148,6 @@ void FlowRecyclerThreadSpawn(void)
             FatalError("flow recycler thread spawn failed");
         }
     }
-    return;
 }
 
 /**
@@ -1217,7 +1214,6 @@ again:
 
     /* reset count, so we can kill and respawn (unix socket) */
     SC_ATOMIC_SET(flowrec_cnt, 0);
-    return;
 }
 
 void TmModuleFlowManagerRegister (void)
index 1bfa18a1cbf6f851d161e8b017e27189cc195f56..5c75e242cb9476d9d150a695183993d2bee5800f 100644 (file)
@@ -409,7 +409,6 @@ static inline void FlowForceReassemblyForHash(void)
         }
         FBLOCK_UNLOCK(fb);
     }
-    return;
 }
 
 /**
@@ -419,5 +418,4 @@ void FlowForceReassembly(void)
 {
     /* Carry out flow reassembly for unattended flows */
     FlowForceReassemblyForHash();
-    return;
 }
index 7f372efb944d12b711e5e74f79c1c5c7379d1e43..b43eae2088904a032922f00be7d568cb45c66dc5 100644 (file)
@@ -141,7 +141,6 @@ void FlowCleanupAppLayer(Flow *f)
     AppLayerParserStateCleanup(f, f->alstate, f->alparser);
     f->alstate = NULL;
     f->alparser = NULL;
-    return;
 }
 
 /** \brief Set the IPOnly scanned flag for 'direction'.
@@ -151,9 +150,7 @@ void FlowCleanupAppLayer(Flow *f)
   */
 void FlowSetIPOnlyFlag(Flow *f, int direction)
 {
-    direction ? (f->flags |= FLOW_TOSERVER_IPONLY_SET) :
-        (f->flags |= FLOW_TOCLIENT_IPONLY_SET);
-    return;
+    direction ? (f->flags |= FLOW_TOSERVER_IPONLY_SET) : (f->flags |= FLOW_TOCLIENT_IPONLY_SET);
 }
 
 /** \brief Set flag to indicate that flow has alerts
@@ -651,7 +648,6 @@ void FlowInitConfig(bool quiet)
     SCLogConfig("flow size %u, memcap allows for %" PRIu64 " flows. Per hash row in perfect "
                 "conditions %" PRIu64,
             sz, flow_memcap_copy / sz, (flow_memcap_copy / sz) / flow_config.hash_size);
-    return;
 }
 
 void FlowReset(void)
@@ -709,7 +705,6 @@ void FlowShutdown(void)
     FlowQueueDestroy(&flow_recycle_q);
     FlowSparePoolDestroy();
     DEBUG_VALIDATE_BUG_ON(SC_ATOMIC_GET(flow_memuse) != 0);
-    return;
 }
 
 /**
@@ -1079,8 +1074,6 @@ void FlowInitFlowProto(void)
         SCLogDebug("deltas: new: -%u est: -%u closed: -%u bypassed: -%u",
                 d->new_timeout, d->est_timeout, d->closed_timeout, d->bypassed_timeout);
     }
-
-    return;
 }
 
 /**
index 2e53789cbff8e90e8fd9b12c7f44273c432156f2..a351b6daec48d47eef23463f4d79302ad47b3f48 100644 (file)
@@ -277,8 +277,6 @@ void HostInitConfig(bool quiet)
         SCLogConfig("host memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
                 SC_ATOMIC_GET(host_memuse), SC_ATOMIC_GET(host_config.memcap));
     }
-
-    return;
 }
 
 /** \brief print some host stats
@@ -289,9 +287,8 @@ void HostPrintStats (void)
     SCLogPerf("hostbits added: %" PRIu32 ", removed: %" PRIu32 ", max memory usage: %" PRIu32 "",
         hostbits_added, hostbits_removed, hostbits_memuse_max);
 #endif /* HOSTBITS_STATS */
-    SCLogPerf("host memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
-            SC_ATOMIC_GET(host_memuse), SC_ATOMIC_GET(host_config.memcap));
-    return;
+    SCLogPerf("host memory usage: %" PRIu64 " bytes, maximum: %" PRIu64, SC_ATOMIC_GET(host_memuse),
+            SC_ATOMIC_GET(host_config.memcap));
 }
 
 /** \brief shutdown the flow engine
@@ -325,7 +322,6 @@ void HostShutdown(void)
     }
     (void) SC_ATOMIC_SUB(host_memuse, host_config.hash_size * sizeof(HostHashRow));
     HostQueueDestroy(&host_spare_q);
-    return;
 }
 
 /** \brief Cleanup the host engine
@@ -366,8 +362,6 @@ void HostCleanup(void)
             HRLOCK_UNLOCK(hb);
         }
     }
-
-    return;
 }
 
 /* calculate the hash key for this packet
@@ -724,4 +718,3 @@ void HostRegisterUnittests(void)
 {
     RegisterHostStorageTests();
 }
-
index ae77d7ca387dbc4c3b42352fca2eaed7c2978216..82dc3b30c1d5ae73cc08423b83757d96ae2d55e1 100644 (file)
@@ -274,8 +274,6 @@ void IPPairInitConfig(bool quiet)
         SCLogConfig("ippair memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
                 SC_ATOMIC_GET(ippair_memuse), SC_ATOMIC_GET(ippair_config.memcap));
     }
-
-    return;
 }
 
 /** \brief print some ippair stats
@@ -286,9 +284,8 @@ void IPPairPrintStats (void)
     SCLogPerf("ippairbits added: %" PRIu32 ", removed: %" PRIu32 ", max memory usage: %" PRIu32 "",
         ippairbits_added, ippairbits_removed, ippairbits_memuse_max);
 #endif /* IPPAIRBITS_STATS */
-    SCLogPerf("ippair memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
+    SCLogPerf("ippair memory usage: %" PRIu64 " bytes, maximum: %" PRIu64,
             SC_ATOMIC_GET(ippair_memuse), SC_ATOMIC_GET(ippair_config.memcap));
-    return;
 }
 
 /** \brief shutdown the flow engine
@@ -323,7 +320,6 @@ void IPPairShutdown(void)
     }
     (void) SC_ATOMIC_SUB(ippair_memuse, ippair_config.hash_size * sizeof(IPPairHashRow));
     IPPairQueueDestroy(&ippair_spare_q);
-    return;
 }
 
 /** \brief Cleanup the ippair engine
@@ -364,8 +360,6 @@ void IPPairCleanup(void)
             HRLOCK_UNLOCK(hb);
         }
     }
-
-    return;
 }
 
 /** \brief compare two raw ipv6 addrs
index ad6a8d77c44c72846170d7febe4296b6d9749d87..c0b6ef7d00f4f37e65efc4e020bb38c9dc9d8fd2 100644 (file)
@@ -215,7 +215,6 @@ void PcapLogRegister(void)
     PcapLogProfileSetup();
     SC_ATOMIC_INIT(thread_cnt);
     SC_ATOMIC_SET(thread_cnt, 1); /* first id is 1 */
-    return;
 }
 
 #define PCAPLOG_PROFILE_START \
@@ -322,8 +321,6 @@ static void PcapFileNameFree(PcapFileName *pf)
         }
         SCFree(pf);
     }
-
-    return;
 }
 
 /**
@@ -1635,8 +1632,6 @@ static void PcapLogFileDeInitCtx(OutputCtx *output_ctx)
 
     pcre2_code_free(pcre_timestamp_code);
     pcre2_match_data_free(pcre_timestamp_match);
-
-    return;
 }
 
 /**
index 19afe78b7ce6605915f5fd587c9622091c2b1349..ab8718aeb4133b87cd672821e0948c56ee1ff645 100644 (file)
@@ -413,5 +413,4 @@ void OutputEmailInitConf(ConfNode *conf, OutputJsonEmailCtx *email_ctx)
             }
         }
     }
-    return;
 }
index 8533bb022759e11270265196f33f1821b2761dfd..055aca13908fd62912eec47eba4e0b28d439c962 100644 (file)
@@ -73,8 +73,6 @@ static void SRepCIDRFreeUserData(void *data)
 {
     if (data != NULL)
         SCFree(data);
-
-    return;
 }
 
 static void SRepCIDRAddNetblock(SRepCIDRTree *cidr_ctx, char *ip, int cat, uint8_t value)
@@ -264,7 +262,6 @@ static int SRepCatSplitLine(char *line, uint8_t *cat, char *shortname, size_t sh
     *cat = (uint8_t)c;
     strlcpy(shortname, ptrs[1], shortname_len);
     return 0;
-
 }
 
 /**
@@ -432,7 +429,6 @@ static int SRepLoadFile(SRepCIDRTree *cidr_ctx, char *filename)
     fclose(fp);
     fp = NULL;
     return r;
-
 }
 
 int SRepLoadFileFromFD(SRepCIDRTree *cidr_ctx, FILE *fp)
index 2521327ddfebb086f479c9f98320631a9fb92c97..c7f61fb00c584954b58a9dee262c9f618349a7cc 100644 (file)
@@ -146,7 +146,6 @@ void RunModeIdsAFPRegister(void)
             "each flow are assigned to a single detect "
             "thread.",
             RunModeIdsAFPAutoFp, AFPRunModeEnableIPS);
-    return;
 }
 
 
index 75f098eadbee107137ecc9f84044e8616861e662..7c27ee6ba8f8c3ed9a57cc5605e47e3a4f983b24 100644 (file)
@@ -76,8 +76,6 @@ void RunModeIdsAFXDPRegister(void)
             "Workers af-xdp mode, each thread does all"
             " tasks from acquisition to logging",
             RunModeIdsAFXDPWorkers, NULL);
-
-    return;
 }
 
 #ifdef HAVE_AF_XDP
index 503d1a15562ab0b8e92a6faf3e13d54f06ac9e76..de16011f1aebb06e1eb2443a44a1691a652ae300 100644 (file)
@@ -62,8 +62,6 @@ void RunModeErfDagRegister(void)
             "Workers DAG mode, each thread does all "
             " tasks from acquisition to logging",
             RunModeIdsErfDagWorkers, NULL);
-
-    return;
 }
 
 int RunModeIdsErfDagSingle(void)
index dc09509d041141b87c1dd30ccaa2b1072802f385..ee56341badd00c7ddec61f73a93252397936e82d 100644 (file)
@@ -45,8 +45,6 @@ void RunModeErfFileRegister(void)
             "Multi threaded ERF file mode.  Packets from "
             "each flow are assigned to a single detect thread",
             RunModeErfFileAutoFp, NULL);
-
-    return;
 }
 
 int RunModeErfFileSingle(void)
index de72f0623d064ebf67d905d284226ca097a6c4ca..4538abc65948a7cecabdda915529aeac0f5940e8 100644 (file)
@@ -53,8 +53,6 @@ void RunModeIpsIPFWRegister(void)
 
     RunModeRegisterNewRunMode(RUNMODE_IPFW, "workers",
             "Multi queue IPFW IPS mode with one thread per queue", RunModeIpsIPFWWorker, NULL);
-
-    return;
 }
 
 int RunModeIpsIPFWAutoFp(void)
index bb91475d67ae689c4c63ac196a3bec222b113aaa..0728cf662525d25a091dcf8408ef9e56f80982e8 100644 (file)
@@ -137,7 +137,6 @@ void RunModeIdsNetmapRegister(void)
             "each flow are assigned to a single detect "
             "thread.",
             RunModeIdsNetmapAutoFp, NetmapRunModeEnableIPS);
-    return;
 }
 
 #ifdef HAVE_NETMAP
index 28b9ae5efd648e75b1f4e8c5d28af42222d6ebd8..cc92a0e803967b12b638b07aee2e12a6522d3a4b 100644 (file)
@@ -218,5 +218,4 @@ void RunModeIdsNflogRegister(void)
             RUNMODE_NFLOG, "single", "Single threaded nflog mode", RunModeIdsNflogSingle, NULL);
     RunModeRegisterNewRunMode(
             RUNMODE_NFLOG, "workers", "Workers nflog mode", RunModeIdsNflogWorkers, NULL);
-    return;
 }
index d9ea93c746f3c0f0126580c6002ec733fbec24f7..70c6a1c40a557b2126b7a76b05323a85fe67af79 100644 (file)
@@ -51,7 +51,6 @@ void RunModeIpsNFQRegister(void)
 
     RunModeRegisterNewRunMode(RUNMODE_NFQ, "workers",
             "Multi queue NFQ IPS mode with one thread per queue", RunModeIpsNFQWorker, NULL);
-    return;
 }
 
 int RunModeIpsNFQAutoFp(void)
index 7c5bfcc4c38a2674096e07b36369887569b72b81..e820eca10c6b5ae32733fe263b5e05896c722b62 100644 (file)
@@ -45,8 +45,6 @@ void RunModeFilePcapRegister(void)
             "Multi-threaded pcap file mode. Packets from each flow are assigned to a consistent "
             "detection thread",
             RunModeFilePcapAutoFp, NULL);
-
-    return;
 }
 
 /**
index 21c32846b737c709cfd82727e6d3c4c1e6c48450..ec881ced4a87bd736ad32097cbd4117a0d130120 100644 (file)
@@ -48,8 +48,6 @@ void RunModeIdsPcapRegister(void)
             "Workers pcap live mode, each thread does all"
             " tasks from acquisition to logging",
             RunModeIdsPcapWorkers, NULL);
-
-    return;
 }
 
 static void PcapDerefConfig(void *conf)
index 584a409e85ee9f14ba9a3aa9876f15fd85b61602..7b0fe7b3d29f631b72fa8ca71df8d36eeefcb2e7 100644 (file)
@@ -63,7 +63,6 @@ void RunModeIdsPfringRegister(void)
             "Workers pfring mode, each thread does all"
             " tasks from acquisition to logging",
             RunModeIdsPfringWorkers, NULL);
-    return;
 }
 
 #ifdef HAVE_PFRING
index a8bfea030961a64bc56bd1268cceaa1b473a16a2..287567570c3ccb6c60a67b53d95ad16afe6a138c 100644 (file)
@@ -247,7 +247,6 @@ void RunModeRegisterRunModes(void)
 #ifdef UNITTESTS
     UtRunModeRegister();
 #endif
-    return;
 }
 
 /**
@@ -290,8 +289,6 @@ void RunModeListRunmodes(void)
                    "-----------------------\n");
         }
     }
-
-    return;
 }
 
 static const char *RunModeGetConfOrDefault(int capture_mode, const char *capture_plugin_name)
@@ -520,8 +517,6 @@ void RunModeRegisterNewRunMode(enum RunModes runmode, const char *name, const ch
     }
     mode->RunModeFunc = RunModeFunc;
     mode->RunModeIsIPSEnabled = RunModeIsIPSEnabled;
-
-    return;
 }
 
 /**
index 317e021a8ed9bfd8c79e502bf1f028a0f8f5e2a6..97c2408912ee3c54422b36490ee82ce7bc4569a7 100644 (file)
@@ -114,8 +114,8 @@ void StreamTcpReassembleInitMemuse(void)
 void StreamTcpReassembleIncrMemuse(uint64_t size)
 {
     (void) SC_ATOMIC_ADD(ra_memuse, size);
-    SCLogDebug("REASSEMBLY %"PRIu64", incr %"PRIu64, StreamTcpReassembleMemuseGlobalCounter(), size);
-    return;
+    SCLogDebug("REASSEMBLY %" PRIu64 ", incr %" PRIu64, StreamTcpReassembleMemuseGlobalCounter(),
+            size);
 }
 
 /**
@@ -141,8 +141,8 @@ void StreamTcpReassembleDecrMemuse(uint64_t size)
         BUG_ON(postsize > presize);
     }
 #endif
-    SCLogDebug("REASSEMBLY %"PRIu64", decr %"PRIu64, StreamTcpReassembleMemuseGlobalCounter(), size);
-    return;
+    SCLogDebug("REASSEMBLY %" PRIu64 ", decr %" PRIu64, StreamTcpReassembleMemuseGlobalCounter(),
+            size);
 }
 
 uint64_t StreamTcpReassembleMemuseGlobalCounter(void)
index f89b565381f1490b09127daf5c2333f859e5eba4..337b626810eff565bc71fe19ff2fda94898c8a21 100644 (file)
@@ -228,8 +228,7 @@ void StreamTcpInitMemuse(void)
 void StreamTcpIncrMemuse(uint64_t size)
 {
     (void) SC_ATOMIC_ADD(st_memuse, size);
-    SCLogDebug("STREAM %"PRIu64", incr %"PRIu64, StreamTcpMemuseCounter(), size);
-    return;
+    SCLogDebug("STREAM %" PRIu64 ", incr %" PRIu64, StreamTcpMemuseCounter(), size);
 }
 
 void StreamTcpDecrMemuse(uint64_t size)
@@ -249,8 +248,7 @@ void StreamTcpDecrMemuse(uint64_t size)
         BUG_ON(postsize > presize);
     }
 #endif
-    SCLogDebug("STREAM %"PRIu64", decr %"PRIu64, StreamTcpMemuseCounter(), size);
-    return;
+    SCLogDebug("STREAM %" PRIu64 ", decr %" PRIu64, StreamTcpMemuseCounter(), size);
 }
 
 uint64_t StreamTcpMemuseCounter(void)
@@ -967,8 +965,7 @@ void StreamTcpSetOSPolicy(TcpStream *stream, Packet *p)
     else if (stream->os_policy == OS_POLICY_OLD_SOLARIS)
         stream->os_policy = OS_POLICY_SOLARIS;
 
-    SCLogDebug("Policy is %"PRIu8"", stream->os_policy);
-
+    SCLogDebug("Policy is %" PRIu8 "", stream->os_policy);
 }
 
 /**
@@ -5103,7 +5100,6 @@ static void StreamTcpPacketCheckPostRst(TcpSession *ssn, Packet *p)
         StreamTcpSetEvent(p, STREAM_SUSPECTED_RST_INJECT);
         return;
     }
-    return;
 }
 
 /**
@@ -7069,8 +7065,6 @@ void TcpSessionSetReassemblyDepth(TcpSession *ssn, uint32_t size)
     if (size > ssn->reassembly_depth || size == 0) {
         ssn->reassembly_depth = size;
     }
-
-    return;
 }
 
 const char *StreamTcpStateAsString(const enum TcpState state)
index 032ceef45fe6e669fef0d8ed7f2152a09ed96fb8..64c27a4235e6376f389c48f10e5cce868f97479a 100644 (file)
@@ -681,7 +681,6 @@ void TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, const void *data)
             b->slot_next = slot;
         }
     }
-    return;
 }
 
 #if !defined __CYGWIN__ && !defined OS_WIN32 && !defined __OpenBSD__ && !defined sun
@@ -1175,8 +1174,6 @@ void TmThreadAppend(ThreadVars *tv, int type)
     }
 
     SCMutexUnlock(&tv_root_lock);
-
-    return;
 }
 
 static bool ThreadStillHasPackets(ThreadVars *tv)
@@ -1340,7 +1337,6 @@ again:
     }
 
     SCMutexUnlock(&tv_root_lock);
-    return;
 }
 
 /**
@@ -1455,7 +1451,6 @@ again:
      * don't process the last live packets together
      * with FFR packets */
     TmThreadDrainPacketThreads();
-    return;
 }
 
 #ifdef DEBUG_VALIDATION
@@ -1526,7 +1521,6 @@ again:
         }
     }
     SCMutexUnlock(&tv_root_lock);
-    return;
 }
 
 #define MIN_WAIT_TIME 100
@@ -1567,8 +1561,6 @@ void TmThreadKillThreads(void)
     for (i = 0; i < TVT_MAX; i++) {
         TmThreadKillThreadsFamily(i);
     }
-
-    return;
 }
 
 static void TmThreadFree(ThreadVars *tv)
@@ -1734,8 +1726,6 @@ void TmThreadInitMC(ThreadVars *tv)
         FatalError("Error initializing the tv->cond condition "
                    "variable");
     }
-
-    return;
 }
 
 static void TmThreadDeinitMC(ThreadVars *tv)
@@ -1748,7 +1738,6 @@ static void TmThreadDeinitMC(ThreadVars *tv)
         SCCtrlCondDestroy(tv->ctrl_cond);
         SCFree(tv->ctrl_cond);
     }
-    return;
 }
 
 /**
@@ -1767,8 +1756,6 @@ void TmThreadTestThreadUnPaused(ThreadVars *tv)
         if (TmThreadsCheckFlag(tv, THV_KILL))
             break;
     }
-
-    return;
 }
 
 /**
@@ -1782,8 +1769,6 @@ void TmThreadWaitForFlag(ThreadVars *tv, uint32_t flags)
     while (!TmThreadsCheckFlag(tv, flags)) {
         SleepUsec(100);
     }
-
-    return;
 }
 
 /**
@@ -1794,7 +1779,6 @@ void TmThreadWaitForFlag(ThreadVars *tv, uint32_t flags)
 void TmThreadContinue(ThreadVars *tv)
 {
     TmThreadsUnsetFlag(tv, THV_PAUSE);
-    return;
 }
 
 static TmEcode WaitOnThreadsRunningByType(const int t)
@@ -1939,7 +1923,6 @@ void TmThreadContinueThreads(void)
         }
     }
     SCMutexUnlock(&tv_root_lock);
-    return;
 }
 
 /**
@@ -1958,7 +1941,6 @@ void TmThreadCheckThreadState(void)
         }
     }
     SCMutexUnlock(&tv_root_lock);
-    return;
 }
 
 /**
index 54fb63725baeae10e0bffb896a8c03a80da82659..6ce4f297956726db0eef66282085704820e35e74 100644 (file)
@@ -79,8 +79,6 @@ void TmqhFlowRegister(void)
     } else {
         tmqh_table[TMQH_FLOW].OutHandler = TmqhOutputFlowHash;
     }
-
-    return;
 }
 
 void TmqhFlowPrintAutofpHandler(void)
@@ -217,8 +215,6 @@ void TmqhOutputFlowFreeCtx(void *ctx)
               fctx->size);
     SCFree(fctx->queues);
     SCFree(fctx);
-
-    return;
 }
 
 void TmqhOutputFlowHash(ThreadVars *tv, Packet *p)
@@ -241,8 +237,6 @@ void TmqhOutputFlowHash(ThreadVars *tv, Packet *p)
     PacketEnqueue(q, p);
     SCCondSignal(&q->cond_q);
     SCMutexUnlock(&q->mutex_q);
-
-    return;
 }
 
 /**
@@ -271,8 +265,6 @@ void TmqhOutputFlowIPPair(ThreadVars *tv, Packet *p)
     PacketEnqueue(q, p);
     SCCondSignal(&q->cond_q);
     SCMutexUnlock(&q->mutex_q);
-
-    return;
 }
 
 static void TmqhOutputFlowFTPHash(ThreadVars *tv, Packet *p)
@@ -299,8 +291,6 @@ static void TmqhOutputFlowFTPHash(ThreadVars *tv, Packet *p)
     PacketEnqueue(q, p);
     SCCondSignal(&q->cond_q);
     SCMutexUnlock(&q->mutex_q);
-
-    return;
 }
 
 #ifdef UNITTESTS
@@ -413,6 +403,4 @@ void TmqhFlowRegisterTests(void)
     UtRegisterTest("TmqhOutputFlowSetupCtxTest03",
                    TmqhOutputFlowSetupCtxTest03);
 #endif
-
-    return;
 }
index 48322bfb633ee3b1c0bd9516017094d17a90a1a8..df27577252a9235572b4a7e36e5c295c2783f194 100644 (file)
@@ -438,8 +438,6 @@ void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
         DEBUG_VALIDATE_BUG_ON(p->flow != NULL);
         TmqhOutputPacketpool(NULL, p);
     }
-
-    return;
 }
 
 /** number of packets to keep reserved when calculating the pending
index df53f3c2f2cfb959687cfb2229d134c182059a8d..38baaac22011b89434f5634fd3f9744b3209d848 100644 (file)
@@ -1205,7 +1205,6 @@ void UnixManagerThreadSpawn(int mode)
             FatalError("Unix socket init failed");
         }
     }
-    return;
 }
 
 // TODO can't think of a good name
@@ -1268,7 +1267,6 @@ again:
     }
 
     SCMutexUnlock(&tv_root_lock);
-    return;
 }
 
 #else /* BUILD_UNIX_SOCKET */
@@ -1276,17 +1274,14 @@ again:
 void UnixManagerThreadSpawn(int mode)
 {
     SCLogError("Unix socket is not compiled");
-    return;
 }
 
 void UnixSocketKillSocketThread(void)
 {
-    return;
 }
 
 void UnixManagerThreadSpawnNonRunmode(const bool unix_socket_enabled)
 {
-    return;
 }
 
 #endif /* BUILD_UNIX_SOCKET */
index 06256db5b8cdc02211c323e34f31bd02b5499275..8a224711e884a4d187b85b4de25d7d8ab7263dd1 100644 (file)
@@ -92,7 +92,6 @@ static void AffinitySetupInit(void)
         }
         SCMutexInit(&thread_affinity[i].taf_mutex, NULL);
     }
-    return;
 }
 
 void BuildCpusetWithCallback(const char *name, ConfNode *node,
index 11aa51afd02baa0683535c587857d3dfee9e9cd2..f5aa4a29794cf710bcb3debc875e2358526f1576 100644 (file)
@@ -69,6 +69,4 @@ void SCAtomicRegisterTests(void)
 #ifdef UNITTESTS
     UtRegisterTest("SCAtomicTest01", SCAtomicTest01);
 #endif
-
-    return;
 }
index 05b365825818893d99155a92d836606b02629a2d..677805b400576c507b3cba809b6e231bffd568e7 100644 (file)
@@ -81,8 +81,6 @@ int MemBufferExpand(MemBuffer **buffer, uint32_t expand_by) {
 void MemBufferFree(MemBuffer *buffer)
 {
     SCFree(buffer);
-
-    return;
 }
 
 void MemBufferPrintToFP(MemBuffer *buffer, FILE *fp)
index e4dc6d5190d4b260283acb6029ead8b7fb680b2f..07f18c2caaaa1112a04eadb0db6247861c678827 100644 (file)
@@ -76,7 +76,6 @@ void SCClassConfInit(DetectEngineCtx *de_ctx)
     }
     de_ctx->class_conf_regex_match =
             pcre2_match_data_create_from_pattern(de_ctx->class_conf_regex, NULL);
-    return;
 }
 
 void SCClassConfDeinit(DetectEngineCtx *de_ctx)
@@ -194,8 +193,6 @@ void SCClassConfDeInitContext(DetectEngineCtx *de_ctx)
         HashTableFree(de_ctx->class_conf_ht);
 
     de_ctx->class_conf_ht = NULL;
-
-    return;
 }
 
 /**
@@ -435,8 +432,6 @@ static void SCClassConfDeAllocClasstype(SCClassConfClasstype *ct)
 
         SCFree(ct);
     }
-
-    return;
 }
 
 /**
@@ -512,8 +507,6 @@ char SCClassConfClasstypeHashCompareFunc(void *data1, uint16_t datalen1,
 void SCClassConfClasstypeHashFree(void *ch)
 {
     SCClassConfDeAllocClasstype(ch);
-
-    return;
 }
 
 /**
index 65074fac0ef9874a6f89e3f05f3099da77d6e9e6..89950154595e63c75c6e1491b682d4bed98fad28 100644 (file)
@@ -378,8 +378,6 @@ void SCLogReleaseFGFilters(void)
         SCMutexUnlock(&sc_log_fg_filters_m[i]);
         sc_log_fg_filters[i] = NULL;
     }
-
-    return;
 }
 
 /**
@@ -628,8 +626,6 @@ void SCLogCheckFDFilterExit(const char *function)
 
     if (thread_list != NULL)
         thread_list->entered--;
-
-    return;
 }
 
 /**
@@ -715,9 +711,7 @@ void SCLogReleaseFDFilters(void)
 
     sc_log_fd_filters = NULL;
 
-    SCMutexUnlock( &sc_log_fd_filters_m );
-
-    return;
+    SCMutexUnlock(&sc_log_fd_filters_m);
 }
 
 /**
@@ -874,8 +868,6 @@ void SCLogAddToFGFFileList(SCLogFGFilterFile *fgf_file,
         sc_log_fg_filters[listtype] = fgf_file_temp;
     else
         fgf_file->next = fgf_file_temp;
-
-    return;
 }
 
 /**
@@ -921,8 +913,6 @@ void SCLogAddToFGFFuncList(SCLogFGFilterFile *fgf_file,
         fgf_file->func = fgf_func_temp;
     else
         fgf_func->next = fgf_func_temp;
-
-    return;
 }
 
 /**
@@ -955,8 +945,6 @@ void SCLogAddToFGFLineList(SCLogFGFilterFunc *fgf_func,
         fgf_func->line = fgf_line_temp;
     else
         fgf_line->next = fgf_line_temp;
-
-    return;
 }
 
 /**
@@ -971,7 +959,4 @@ void SCLogReleaseFDFilter(SCLogFDFilter *fdf)
             SCFree(fdf->func);
         SCFree(fdf);
     }
-
-    return;
 }
-
index c62a0104dda3fadf12f18ed02f5088a8a9bd53f5..f2a7b2dd212412dcf2e3d47534e7e5c35c5b64a3 100644 (file)
@@ -173,8 +173,6 @@ static inline void SCLogPrintToStream(FILE *fd, char *msg)
 #if defined (OS_WIN32)
        SCMutexUnlock(&sc_log_stream_lock);
 #endif /* OS_WIN32 */
-
-    return;
 }
 
 /**
@@ -193,8 +191,6 @@ static inline void SCLogPrintToSyslog(int syslog_log_level, const char *msg)
     //syslog_r(syslog_log_level, NULL, "%s", msg);
 
     syslog(syslog_log_level, "%s", msg);
-
-    return;
 }
 
 /**
@@ -1031,8 +1027,6 @@ static inline void SCLogFreeLogOPIfaceCtx(SCLogOPIfaceCtx *iface_ctx)
 
         SCFree(temp);
     }
-
-    return;
 }
 
 /**
@@ -1071,8 +1065,6 @@ static inline void SCLogSetLogLevel(SCLogInitData *sc_lid, SCLogConfig *sc_lc)
 
     /* we also set it to a global var, as it is easier to access it */
     sc_log_global_log_level = sc_lc->log_level;
-
-    return;
 }
 
 SCLogLevel SCLogGetLogLevel(void)
@@ -1130,8 +1122,6 @@ static inline void SCLogSetLogFormat(SCLogInitData *sc_lid, SCLogConfig *sc_lc)
         printf("Error allocating memory\n");
         exit(EXIT_FAILURE);
     }
-
-    return;
 }
 
 /**
@@ -1203,7 +1193,6 @@ static inline void SCLogSetOPIface(SCLogInitData *sc_lid, SCLogConfig *sc_lc)
         sc_lc->op_ifaces = op_ifaces_ctx;
         sc_lc->op_ifaces_cnt++;
     }
-    return;
 }
 
 /**
@@ -1248,8 +1237,6 @@ static inline void SCLogSetOPFilter(SCLogInitData *sc_lid, SCLogConfig *sc_lc)
         sc_lc->op_filter_regex_match =
                 pcre2_match_data_create_from_pattern(sc_lc->op_filter_regex, NULL);
     }
-
-    return;
 }
 
 /**
@@ -1283,8 +1270,6 @@ static void SCLogFreeLogInitData(SCLogInitData *sc_lid)
         SCLogFreeLogOPIfaceCtx(sc_lid->op_ifaces);
         SCFree(sc_lid);
     }
-
-    return;
 }
 #endif
 #endif
@@ -1310,8 +1295,6 @@ static inline void SCLogFreeLogConfig(SCLogConfig *sc_lc)
         SCLogFreeLogOPIfaceCtx(sc_lc->op_ifaces);
         SCFree(sc_lc);
     }
-
-    return;
 }
 
 /**
@@ -1344,8 +1327,6 @@ void SCLogAppendOPIfaceCtx(SCLogOPIfaceCtx *iface_ctx, SCLogInitData *sc_lid)
         prev->next = iface_ctx;
 
     sc_lid->op_ifaces_cnt++;
-
-    return;
 }
 
 #ifdef UNITTESTS
@@ -1434,7 +1415,6 @@ void SCLogInitLogModule(SCLogInitData *sc_lid)
     //SCOutputPrint(sc_did->startup_message);
 
     rs_log_set_level(sc_log_global_log_level);
-    return;
 }
 
 void SCLogLoadConfig(int daemon, int verbose, uint32_t userid, uint32_t groupid)
@@ -1632,8 +1612,6 @@ void SCLogDeInitLogModule(void)
 #if defined (OS_WIN32)
     SCMutexDestroy(&sc_log_stream_lock);
 #endif /* OS_WIN32 */
-
-    return;
 }
 
 //------------------------------------Unit_Tests--------------------------------
index 9029335301d4f10cdac1c8f28b8feab0a59cc2cd..ea0811b89a1528ec4c120790d4d23099815331ea 100644 (file)
@@ -586,7 +586,6 @@ void EBPFBypassFree(void *data)
         SCFree(eb->key[1]);
     }
     SCFree(eb);
-    return;
 }
 
 /**
index 02b3ee72a263c891b89b740ec4e8f4adb90f9dfd..efbf8024d45222b005966b233cf96c1287e724c5 100644 (file)
@@ -101,8 +101,6 @@ static void SCHInfoFreeUserDataOSPolicy(void *data)
 {
     if (data != NULL)
         SCFree(data);
-
-    return;
 }
 
 /**
@@ -323,8 +321,6 @@ void SCHInfoCleanResources(void)
         SCRadixReleaseRadixTree(sc_hinfo_tree);
         sc_hinfo_tree = NULL;
     }
-
-    return;
 }
 
 /**
@@ -364,16 +360,12 @@ static void SCHInfoCreateContextBackup(void)
 {
     sc_hinfo_tree_backup = sc_hinfo_tree;
     sc_hinfo_tree = NULL;
-
-    return;
 }
 
 static void SCHInfoRestoreContextBackup(void)
 {
     sc_hinfo_tree = sc_hinfo_tree_backup;
     sc_hinfo_tree_backup = NULL;
-
-    return;
 }
 
 /**
@@ -1637,5 +1629,4 @@ void SCHInfoRegisterTests(void)
     UtRegisterTest("SCHInfoTestLoadFromConfig04", SCHInfoTestLoadFromConfig04);
     UtRegisterTest("SCHInfoTestLoadFromConfig05", SCHInfoTestLoadFromConfig05);
 #endif /* UNITTESTS */
-
 }
index 8d482d90ed5ffb63e9bc5e9f383728f1bd43e3d4..8792253cc3c968d59bd9a9fadd7a8d7f2ea973fa 100644 (file)
@@ -200,6 +200,4 @@ void MaskIPNetblock(uint8_t *stream, int netmask, int key_bitlen)
         }
         stream[i] &= mask;
     }
-
-    return;
 }
index 258993c30d5c27b28f8621ef390c8207f5426b18..245be5634fd52002bd34f8fbf8e75e63097fa67e 100644 (file)
@@ -33,7 +33,6 @@
 
 void LandlockSandboxing(SCInstance *suri)
 {
-    return;
 }
 
 #else /* HAVE_LINUX_LANDLOCK_H */
index 7902e0619702a81f4bd23c6a52f686ca76e993c1..bf3edf05721e076b622df9a37d17cbdf0fa2d773 100644 (file)
@@ -428,6 +428,4 @@ void MacSetRegisterTests(void)
     UtRegisterTest("MacSetTest04", MacSetTest04);
     UtRegisterTest("MacSetTest05", MacSetTest05);
 #endif
-
-    return;
 }
index 27d5ff064338b76bd8c4abeda392954af4354cf5..6e115acaa305580991d282bb1c4fdef002644a8c 100644 (file)
@@ -107,9 +107,7 @@ static void SCACGetConfig(void)
     //ConfNode *ac_conf;
     //const char *hash_val = NULL;
 
-    //ConfNode *pm = ConfGetNode("pattern-matcher");
-
-    return;
+    // ConfNode *pm = ConfGetNode("pattern-matcher");
 }
 
 /**
@@ -274,8 +272,6 @@ static void SCACSetOutputState(int32_t state, uint32_t pid, MpmCtx *mpm_ctx)
     output_state->pids = ptmp;
 
     output_state->pids[output_state->no_of_entries - 1] = pid;
-
-    return;
 }
 
 /**
@@ -318,8 +314,6 @@ static inline void SCACEnter(uint8_t *pattern, uint16_t pattern_len, uint32_t pi
     /* add this pattern id, to the output table of the last state, where the
      * pattern ends in the trie */
     SCACSetOutputState(state, pid, mpm_ctx);
-
-    return;
 }
 
 /**
@@ -345,8 +339,6 @@ static inline void SCACCreateGotoTable(MpmCtx *mpm_ctx)
             ctx->goto_table[0][ascii_code] = 0;
         }
     }
-
-    return;
 }
 
 static inline void SCACDetermineLevel1Gap(MpmCtx *mpm_ctx)
@@ -366,8 +358,6 @@ static inline void SCACDetermineLevel1Gap(MpmCtx *mpm_ctx)
         int32_t newstate = SCACInitNewState(mpm_ctx);
         ctx->goto_table[0][u] = newstate;
     }
-
-    return;
 }
 
 static inline int SCACStateQueueIsEmpty(StateQueue *q)
@@ -396,8 +386,6 @@ static inline void SCACEnqueue(StateQueue *q, int32_t state)
     if (q->top == q->bot) {
         FatalError("Just ran out of space in the queue. Please file a bug report on this");
     }
-
-    return;
 }
 
 static inline int32_t SCACDequeue(StateQueue *q)
@@ -454,8 +442,6 @@ static inline void SCACClubOutputStates(int32_t dst_state, int32_t src_state,
                 output_src_state->pids[i];
         }
     }
-
-    return;
 }
 
 /**
@@ -512,8 +498,6 @@ static inline void SCACCreateFailureTable(MpmCtx *mpm_ctx)
         }
     }
     SCFree(q);
-
-    return;
 }
 
 /**
@@ -606,8 +590,6 @@ static inline void SCACCreateDeltaTable(MpmCtx *mpm_ctx)
         }
         SCFree(q);
     }
-
-    return;
 }
 
 static inline void SCACClubOutputStatePresenceWithDeltaTable(MpmCtx *mpm_ctx)
@@ -636,8 +618,6 @@ static inline void SCACClubOutputStatePresenceWithDeltaTable(MpmCtx *mpm_ctx)
             }
         }
     }
-
-    return;
 }
 
 static inline void SCACInsertCaseSensitiveEntriesForPatterns(MpmCtx *mpm_ctx)
@@ -657,8 +637,6 @@ static inline void SCACInsertCaseSensitiveEntriesForPatterns(MpmCtx *mpm_ctx)
             }
         }
     }
-
-    return;
 }
 
 #if 0
@@ -676,8 +654,6 @@ static void SCACPrintDeltaTable(MpmCtx *mpm_ctx)
             }
         }
     }
-
-    return;
 }
 #endif
 
@@ -719,8 +695,6 @@ static void SCACPrepareStateTable(MpmCtx *mpm_ctx)
     ctx->goto_table = NULL;
     SCFree(ctx->failure_table);
     ctx->failure_table = NULL;
-
-    return;
 }
 
 /**
@@ -921,8 +895,6 @@ void SCACDestroyCtx(MpmCtx *mpm_ctx)
     mpm_ctx->ctx = NULL;
     mpm_ctx->memory_cnt--;
     mpm_ctx->memory_size -= sizeof(SCACCtx);
-
-    return;
 }
 
 /**
@@ -1114,8 +1086,6 @@ void SCACPrintInfo(MpmCtx *mpm_ctx)
     printf("Largest:         %" PRIu32 "\n", mpm_ctx->maxlen);
     printf("Total states in the state table:    %" PRIu32 "\n", ctx->state_count);
     printf("\n");
-
-    return;
 }
 
 
@@ -1138,7 +1108,6 @@ void MpmACRegister(void)
     mpm_table[MPM_AC].RegisterUnittests = SCACRegisterTests;
 #endif
     mpm_table[MPM_AC].feature_flags = MPM_FEATURE_FLAG_DEPTH | MPM_FEATURE_FLAG_OFFSET;
-    return;
 }
 
 /*************************************Unittests********************************/
index b22b6f869db6523ea7e6e03a6179485d62efbd08..82b91b4ec0e8dbd4455bda885ca0299a3fc98037 100644 (file)
@@ -1001,7 +1001,6 @@ int SCHSAddPatternCS(MpmCtx *mpm_ctx, uint8_t *pat, uint16_t patlen,
 
 void SCHSPrintSearchStats(MpmThreadCtx *mpm_thread_ctx)
 {
-    return;
 }
 
 void SCHSPrintInfo(MpmCtx *mpm_ctx)
index affcd49cbb879f46a4f6f8eaf4730a72a8d1eb9f..bb09dcd8efbefcfea6ab158358fc2bd149e6c45c 100644 (file)
@@ -1216,8 +1216,6 @@ void NapatechStartStats(void)
     if (TmThreadSpawn(buf_monitor_tv) != 0) {
         FatalError("Failed to spawn thread for NapatechBufMonitor - Killing engine.");
     }
-
-    return;
 }
 
 bool NapatechSetupNuma(uint32_t stream, uint32_t numa)
index 1d7523f75beee707c27cb9fbfae1bc9e19ca8d9a..11069a78862f4875e512f21901f98d8c5c35ebc1 100644 (file)
@@ -389,7 +389,6 @@ static int PoolTestInitArg(void *data, void *allocdata)
 
 static void PoolTestFree(void *ptr)
 {
-    return;
 }
 
 static int PoolTestInit01 (void)
index 57fe1094f204b42666dbb30ac8187ef7e8929758..e45a55eb23dfce62c0c83c8ef5d8982ebe9bcc1b 100644 (file)
@@ -300,7 +300,6 @@ error:
         DetectPortFree(de_ctx, new_port);
     if (stack != NULL)
         SCFree(stack);
-    return;
 }
 
 /**
index 4ca901fa0c2a40df01b0e7542aa8939d37fd4c0e..65de27eb38992c5aa69704eee7b2cefb9b1a4701 100644 (file)
@@ -107,8 +107,6 @@ void PrintRawUriBuf(char *retbuf, uint32_t *offset, uint32_t retbuflen,
                             "\\x%02X", buf[u]);
         }
     }
-
-    return;
 }
 
 void PrintRawDataFp(FILE *fp, const uint8_t *buf, uint32_t buflen)
@@ -192,8 +190,6 @@ void PrintRawDataToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32
     }
     if (ch != 16)
         PrintBufferData((char *)dst_buf, dst_buf_offset_ptr, dst_buf_size, "\n");
-
-    return;
 }
 
 void PrintStringsToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32_t dst_buf_size,
@@ -208,8 +204,6 @@ void PrintStringsToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32
         }
     }
     dst_buf[dst_buf_size - 1] = 0;
-
-    return;
 }
 
 static const char *PrintInetIPv6(const void *src, char *dst, socklen_t size)
index 00f9ef652a3086f8ab63d9a13110b84aff67b83b..5215b4ec2d8850360383c333706aed91568a7363 100644 (file)
@@ -136,8 +136,6 @@ static void LockRecordAdd(ProfilingLock *l)
         lookup_fn->ticks_cnt++;
         lookup_fn->cont += l->cont;
     }
-
-    return;
 }
 
 /** \param p void ptr to Packet struct */
@@ -239,4 +237,3 @@ void LockRecordFreeHash(void)
 
 #endif
 #endif
-
index 41423c9477d65ecbd6c6668983f4c4ed8aa489ab..c6d91ae76d7e0cece6b66f6da5df5214bed4f5cf 100644 (file)
@@ -401,7 +401,6 @@ static void ProtoNameAddEntry(const char *proto_name, const uint8_t proto_number
                    "name: \"%s\"; number: %d",
                 proto_ent->name, proto_ent->number);
     }
-    return;
 }
 
 static void ProtoNameHashFreeFunc(void *data)
index 0362f21f2919a8d92f35553e99da9e04c2ac4d2c..0f570fdbc9f8d20d55d396a3f7b316cdd675d64e 100644 (file)
@@ -68,8 +68,6 @@ static SCRadixUserData *SCRadixAllocSCRadixUserData(uint8_t netmask, void *user)
 static void SCRadixDeAllocSCRadixUserData(SCRadixUserData *user_data)
 {
     SCFree(user_data);
-
-    return;
 }
 
 /**
@@ -108,8 +106,6 @@ static void SCRadixAppendToSCRadixUserDataList(SCRadixUserData *new,
         new->next = prev->next;
         prev->next = new;
     }
-
-    return;
 }
 
 /**
@@ -185,10 +181,8 @@ static void SCRadixAddNetmaskUserDataToPrefix(SCRadixPrefix *prefix,
         FatalError("prefix or user NULL");
     }
 
-    SCRadixAppendToSCRadixUserDataList(SCRadixAllocSCRadixUserData(netmask, user),
-                                       &prefix->user_data);
-
-    return;
+    SCRadixAppendToSCRadixUserDataList(
+            SCRadixAllocSCRadixUserData(netmask, user), &prefix->user_data);
 }
 
 /**
@@ -222,8 +216,6 @@ static void SCRadixRemoveNetmaskUserDataFromPrefix(SCRadixPrefix *prefix,
         prev = temp;
         temp = temp->next;
     }
-
-    return;
 }
 
 /**
@@ -363,8 +355,6 @@ static void SCRadixReleasePrefix(SCRadixPrefix *prefix, SCRadixTree *tree)
 
         SCFree(prefix);
     }
-
-    return;
 }
 
 /**
@@ -400,8 +390,6 @@ static void SCRadixReleaseNode(SCRadixNode *node, SCRadixTree *tree)
 
         SCFree(node);
     }
-
-    return;
 }
 
 /**
@@ -442,8 +430,6 @@ static void SCRadixReleaseRadixSubtree(SCRadixNode *node, SCRadixTree *tree)
         SCRadixReleaseRadixSubtree(node->right, tree);
         SCRadixReleaseNode(node, tree);
     }
-
-    return;
 }
 
 /**
@@ -459,7 +445,6 @@ void SCRadixReleaseRadixTree(SCRadixTree *tree)
     SCRadixReleaseRadixSubtree(tree->head, tree);
     tree->head = NULL;
     SCFree(tree);
-    return;
 }
 
 /**
@@ -1152,8 +1137,6 @@ static void SCRadixTransferNetmasksBWNodes(SCRadixNode *dest, SCRadixNode *src)
 
     for (i = dest->netmask_cnt, j = 0; j < src->netmask_cnt; i++, j++)
         dest->netmasks[i] = src->netmasks[j];
-
-    return;
 }
 
 /**
@@ -1214,8 +1197,6 @@ static void SCRadixRemoveNetblockEntry(SCRadixNode *node, uint8_t netmask)
         return;
     }
     node->netmasks = ptmp;
-
-    return;
 }
 
 /**
@@ -1351,8 +1332,6 @@ static void SCRadixRemoveKey(uint8_t *key_stream, uint16_t key_bitlen,
     SCRadixReleaseNode(parent, tree);
     SCRadixReleaseNode(node, tree);
     SCRadixReleasePrefix(prefix, tree);
-
-    return;
 }
 
 /**
@@ -1370,7 +1349,6 @@ void SCRadixRemoveKeyIPV4Netblock(uint8_t *key_stream, SCRadixTree *tree,
     SCRadixValidateIPv4Key(key_stream, netmask);
 #endif
     SCRadixRemoveKey(key_stream, 32, tree, netmask);
-    return;
 }
 
 /**
@@ -1386,7 +1364,6 @@ void SCRadixRemoveKeyIPV4Netblock(uint8_t *key_stream, SCRadixTree *tree,
 void SCRadixRemoveKeyIPV4(uint8_t *key_stream, SCRadixTree *tree)
 {
     SCRadixRemoveKey(key_stream, 32, tree, 32);
-    return;
 }
 
 /**
@@ -1404,7 +1381,6 @@ void SCRadixRemoveKeyIPV6Netblock(uint8_t *key_stream, SCRadixTree *tree,
     SCRadixValidateIPv6Key(key_stream, netmask);
 #endif
     SCRadixRemoveKey(key_stream, 128, tree, netmask);
-    return;
 }
 
 /**
@@ -1420,7 +1396,6 @@ void SCRadixRemoveKeyIPV6Netblock(uint8_t *key_stream, SCRadixTree *tree,
 void SCRadixRemoveKeyIPV6(uint8_t *key_stream, SCRadixTree *tree)
 {
     SCRadixRemoveKey(key_stream, 128, tree, 128);
-    return;
 }
 
 /**
@@ -1683,8 +1658,6 @@ void SCRadixPrintNodeInfo(SCRadixNode *node, int level,  void (*PrintData)(void*
     } else {
         printf("inter_node)\n");
     }
-
-    return;
 }
 
 /**
@@ -1701,8 +1674,6 @@ static void SCRadixPrintRadixSubtree(SCRadixNode *node, int level, void (*PrintD
         SCRadixPrintRadixSubtree(node->left, level + 1, PrintData);
         SCRadixPrintRadixSubtree(node->right, level + 1, PrintData);
     }
-
-    return;
 }
 
 /**
@@ -1728,8 +1699,6 @@ void SCRadixPrintTree(SCRadixTree *tree)
     printf("Printing the Radix Tree: \n");
 
     SCRadixPrintRadixSubtree(tree->head, 0, tree->PrintData);
-
-    return;
 }
 
 /*------------------------------------Unit_Tests------------------------------*/
@@ -3832,6 +3801,4 @@ void SCRadixRegisterTests(void)
     UtRegisterTest("SCRadixTestIPV4NetblockInsertion26",
                    SCRadixTestIPV4NetblockInsertion26);
 #endif
-
-    return;
 }
index 8a84af57d6c7e55913483ae90ef0267c9a335243..1f7dc39573fd711065a0add38d108857609c2ba4 100644 (file)
@@ -67,7 +67,6 @@ void SCReferenceConfInit(DetectEngineCtx *de_ctx)
     }
     de_ctx->reference_conf_regex_match =
             pcre2_match_data_create_from_pattern(de_ctx->reference_conf_regex, NULL);
-    return;
 }
 
 void SCReferenceConfDeinit(DetectEngineCtx *de_ctx)
@@ -183,8 +182,6 @@ void SCRConfDeInitContext(DetectEngineCtx *de_ctx)
         HashTableFree(de_ctx->reference_conf_ht);
 
     de_ctx->reference_conf_ht = NULL;
-
-    return;
 }
 
 /**
@@ -395,8 +392,6 @@ void SCRConfDeAllocSCRConfReference(SCRConfReference *ref)
 
         SCFree(ref);
     }
-
-    return;
 }
 
 /**
@@ -472,8 +467,6 @@ char SCRConfReferenceHashCompareFunc(void *data1, uint16_t datalen1,
 void SCRConfReferenceHashFree(void *data)
 {
     SCRConfDeAllocSCRConfReference(data);
-
-    return;
 }
 
 /**
@@ -790,6 +783,4 @@ void SCRConfRegisterTests(void)
     UtRegisterTest("SCRConfTest05", SCRConfTest05);
     UtRegisterTest("SCRConfTest06", SCRConfTest06);
 #endif /* UNITTESTS */
-
-    return;
 }
index e526035d030a2ec41e3602c44bd85ed8557281cf..47193c2d261f07480b1e42d0802e0d32945882cd 100644 (file)
@@ -407,6 +407,4 @@ void SCRuleVarsRegisterTests(void)
 
     UtRegisterTest("SCRuleVarsMTest01", SCRuleVarsMTest01);
 #endif
-
-    return;
 }
index f96190f9aedd2cae8ca612b04981f0815b6b6197..30a9206b8e56be20e0dc62dc4798c90219c6ad39 100644 (file)
@@ -71,6 +71,4 @@ void UtilSignalHandlerSetup(int sig, void (*handler)(int))
     action.sa_flags = 0;
     sigaction(sig, &action, 0);
 #endif /* OS_WIN32 */
-
-    return;
 }
index 6f9146269bbc939fa1c26f53b82a352e29ba7efc..0497e70769b6f274860e207811d7dfe40e49aa50 100644 (file)
@@ -1690,7 +1690,6 @@ void StreamingBufferSBBGetData(const StreamingBuffer *sb,
     }
     *data = NULL;
     *data_len = 0;
-    return;
 }
 
 /** \brief get the data for one SBB */
@@ -1733,7 +1732,6 @@ void StreamingBufferSBBGetDataAtOffset(const StreamingBuffer *sb,
 
     *data = NULL;
     *data_len = 0;
-    return;
 }
 
 void StreamingBufferSegmentGetData(const StreamingBuffer *sb,
@@ -1763,7 +1761,6 @@ void StreamingBufferSegmentGetData(const StreamingBuffer *sb,
     }
     *data = NULL;
     *data_len = 0;
-    return;
 }
 
 /**
index 6443990bc219f860cf5ac1dd3e6d9065b9a0a274..a17679605a2273241e683d5bb3433da93a2d9914 100644 (file)
@@ -372,7 +372,6 @@ void THashShutdown(THashTableContext *ctx)
     (void) SC_ATOMIC_SUB(ctx->memuse, ctx->config.hash_size * sizeof(THashHashRow));
     THashDataQueueDestroy(&ctx->spare_q);
     SCFree(ctx);
-    return;
 }
 
 /** \brief Walk the hash
@@ -446,7 +445,6 @@ void THashCleanup(THashTableContext *ctx)
         }
         HRLOCK_UNLOCK(hb);
     }
-    return;
 }
 
 /* calculate the hash key for this packet
index 79663e8db9382124c7974e0f6f29e6094a7f4664..a85faad14febfbfaeba0dfe33de605d5ec784401 100644 (file)
@@ -208,7 +208,6 @@ static void SCThresholdConfDeInitContext(DetectEngineCtx *de_ctx, FILE *fd)
 {
     if (fd != NULL)
         fclose(fd);
-    return;
 }
 
 /** \internal
index d4ef5dc99c76ed7ed24c64a270a418bf50429d18..7f764fd5c7450517bd33c8ad5aa7e2c8fe691d8b 100644 (file)
@@ -283,8 +283,6 @@ void UtCleanup(void)
 void UtRunModeRegister(void)
 {
     RunModeRegisterNewRunMode(RUNMODE_UNITTEST, "unittest", "Unittest mode", NULL, NULL);
-
-    return;
 }
 
 /*