]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
removed ! from error messages
authorRuss Combs <rucombs@cisco.com>
Sat, 4 Oct 2014 03:05:31 +0000 (23:05 -0400)
committerRuss Combs <rucombs@cisco.com>
Sat, 4 Oct 2014 03:05:31 +0000 (23:05 -0400)
37 files changed:
ChangeLog
doc/style.txt
src/codecs/link/cd_ppp_encap.cc
src/codecs/root/root_enc.cc
src/codecs/root/root_fddi.cc
src/codecs/root/root_oldpflog.cc
src/codecs/root/root_pflog.cc
src/detection/detection_options.cc
src/detection/fpcreate.cc
src/file_api/libs/file_config.cc
src/file_api/libs/file_lib.cc
src/hash/sfxhash.cc
src/ips_options/asn1_util.cc
src/ips_options/ips_content.cc
src/log/log_text.cc
src/log/text_log.cc
src/loggers/alert_syslog.cc
src/loggers/alert_unixsock.cc
src/loggers/unified2.cc
src/main.cc
src/main/modules.cc
src/main/thread.cc
src/managers/codec_manager.cc
src/network_inspectors/port_scan/ipobj.cc
src/packet_io/active.cc
src/packet_io/sfdaq.cc
src/parser/vars.cc
src/search_engines/acsmx.cc
src/search_engines/acsmx2.cc
src/service_inspectors/ftp_telnet/hi_util_kmap.cc
src/service_inspectors/http_inspect/hi_util_kmap.cc
src/stream/ip/ip_defrag.cc
src/stream/tcp/tcp_session.cc
src/utils/boyer_moore.cc
src/utils/sfportobject.cc
src/utils/util.cc
src/utils/util.h

index bb32f8f60d78fb4c064b3cd97bc4fb23cb4edd07..36e07e6c129b78231d775571cf5520e0948954cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 -- disabled markup sanitizer() for correct asciidoc results
 -- tweaked snort.lua and snort_defaults.lua
 -- updated usage
+-- removed ! from error messages
 
 122
 -- pulled thread pinning from Josh
index 04cdb5cb55827822d00710a38ad884038c0591aa..9c80b6bfcd5ef635d19557757719b412b6334368 100644 (file)
@@ -42,6 +42,10 @@ yet firm so feedback is welcome to get something we can live with.
 
 * Most debug messages should just be deleted.
 
+* Don't bang your messages (no !).  The user feels bad enough about the
+  problem already w/o you shouting at him.
+
+
 ==== Types
 
 * Use logical types to make the code clearer and to help the compiler catch
index 961287037593cc5dcf58ce436a7b4b33e4d80594..0c820d5691ec9ec49b1d496a18883e1d8124e196 100644 (file)
@@ -118,7 +118,7 @@ bool PppEncap::decode(const RawData& raw, CodecData& codec, DecodeData&)
         case PPP_VJ_COMP:
             if (!had_vj)
                 ErrorMessage("PPP link seems to use VJ compression, "
-                        "cannot handle compressed packets!\n");
+                        "cannot handle compressed packets\n");
             had_vj = true;
             return false;
         case PPP_VJ_UCOMP:
@@ -127,7 +127,7 @@ bool PppEncap::decode(const RawData& raw, CodecData& codec, DecodeData&)
             if(raw.len < (uint32_t)(codec.lyr_len + ip::IP4_HEADER_LEN))
             {
                 if (ScLogVerbose())
-                    ErrorMessage("PPP VJ min packet length > captured len"
+                    ErrorMessage("PPP VJ min packet length > captured len"
                                  "(%d bytes)\n", raw.len);
                 return false;
             }
index bb7d088f3ac8141f63847c8a4ee14ffb62704930..233f1ea6c493aedcf6c8f7fb01194cf3c732c7e2 100644 (file)
@@ -71,7 +71,7 @@ void DecodeEncPkt(Packet *p, const DAQ_PktHdr_t *pkthdr, const uint8_t *pkt)
     {
         if (ScLogVerbose())
         {
-            ErrorMessage("Captured data length < Encap header length (%d bytes)\n",
+            ErrorMessage("Captured data length < Encap header length (%d bytes)\n",
                 cap_len);
         }
         MODULE_PROFILE_END(decodePerfStats);
index 4bfed1d7a7c390889c07536c3862d1d797eba23e..5b3354bd519e347ab24144b8e5436b7ed26f563e 100644 (file)
@@ -103,7 +103,7 @@ void DecodeFDDIPkt(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
     {
         if (ScLogVerbose())
         {
-            ErrorMessage("Captured data length < FDDI header length! "
+            ErrorMessage("Captured data length < FDDI header length "
                          "(%d %d bytes)\n", cap_len, dataoff);
             MODULE_PROFILE_END(decodePerfStats);
             return;
@@ -129,7 +129,7 @@ void DecodeFDDIPkt(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
         {
             if (ScLogVerbose())
             {
-                ErrorMessage("Captured data length < FDDI header length! "
+                ErrorMessage("Captured data length < FDDI header length "
                              "(%d %d bytes)\n", cap_len, dataoff);
                 MODULE_PROFILE_END(decodePerfStats);
                 return;
@@ -147,7 +147,7 @@ void DecodeFDDIPkt(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
         {
             if (ScLogVerbose())
             {
-                ErrorMessage("Captured data length < FDDI header length! "
+                ErrorMessage("Captured data length < FDDI header length "
                              "(%d %d bytes)\n", cap_len, dataoff);
                 MODULE_PROFILE_END(decodePerfStats);
                 return;
@@ -167,7 +167,7 @@ void DecodeFDDIPkt(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
         {
             if (ScLogVerbose())
             {
-                ErrorMessage("Captured data length < FDDI header length! "
+                ErrorMessage("Captured data length < FDDI header length "
                              "(%d %d bytes)\n", cap_len, dataoff);
                 MODULE_PROFILE_END(decodePerfStats);
                 return;
index 75ac0b81f8a2d4f4620480ff1d1f7dab721cff10..20198a87ab662b3e11e290442404fd694bd97b59 100644 (file)
@@ -68,7 +68,7 @@ void DecodeOldPflog(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt
     {
         if (ScLogVerbose())
         {
-            ErrorMessage("Captured data length < Pflog header length! "
+            ErrorMessage("Captured data length < Pflog header length "
                     "(%d bytes)\n", cap_len);
         }
         MODULE_PROFILE_END(decodePerfStats);
index 9880fe5c6507b52cbeb98e5088dec2545c3ad2a2..a4ac51399cc7297ee33e5c44294e00c9560e37e7 100644 (file)
@@ -179,7 +179,7 @@ void DecodePflog(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
     {
         if (ScLogVerbose())
         {
-            ErrorMessage("Captured data length < minimum Pflog length! "
+            ErrorMessage("Captured data length < minimum Pflog length "
                     "(%d < %lu)\n", cap_len, (unsigned long)PFLOG2_HDRMIN);
         }
         MODULE_PROFILE_END(decodePerfStats);
@@ -211,7 +211,7 @@ void DecodePflog(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
         default:
             if (ScLogVerbose())
             {
-                ErrorMessage("unrecognized pflog header length! (%d)\n",
+                ErrorMessage("unrecognized pflog header length (%d)\n",
                     *((uint8_t*)pkt));
             }
             dc.discards++;
@@ -224,7 +224,7 @@ void DecodePflog(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
     {
         if (ScLogVerbose())
         {
-            ErrorMessage("Captured data length < Pflog header length! "
+            ErrorMessage("Captured data length < Pflog header length "
                     "(%d < %d)\n", cap_len, hlen);
         }
         dc.discards++;
@@ -236,7 +236,7 @@ void DecodePflog(Packet * p, const DAQ_PktHdr_t * pkthdr, const uint8_t * pkt)
     {
         if (ScLogVerbose())
         {
-            ErrorMessage("Bad Pflog header length! (%d bytes)\n", pflen);
+            ErrorMessage("Bad Pflog header length (%d bytes)\n", pflen);
         }
         dc.discards++;
         MODULE_PROFILE_END(decodePerfStats);
index 37cfbc7df4f36f8fd3e55abe1eced066ab2590a6..e26de90cb45820d7cecbabfcbedde445dc852c9e 100644 (file)
@@ -478,7 +478,8 @@ int detection_option_node_evaluate(
 
                         if (otn->sigInfo.num_services && check_ports) /* none of the services match */
                         {
-                            DEBUG_WRAP(DebugMessage(DEBUG_DETECT, "[**] SID %d not matched because of service mismatch (%d!=%d [**]\n",
+                            DEBUG_WRAP(DebugMessage(DEBUG_DETECT, 
+                                "[**] SID %d not matched because of service mismatch (%d!=%d [**]\n",
                                 otn->sigInfo.id,
                                 eval_data->p->application_protocol_ordinal,
                                 otn->sigInfo.services[0].service_ordinal););
index 5f361662c3aaed07ef06d34931e06243950d23f4..a5e89e1841fe4ece9a28dea14bb5380d7669fcb6 100644 (file)
@@ -1856,7 +1856,7 @@ static int fpCreatePortGroups(
     /* convert the tcp-any-any to a PortObject2 creature */
     po2 = PortObject2Dup(p->tcp_anyany);
     if (po2 == NULL)
-        FatalError("Could not create a PortObject version 2 for tcp-any-any rules\n!");
+        FatalError("Could not create a PortObject version 2 for tcp-any-any rules\n");
 
     if (!fpDetectSplitAnyAny(fp))
         add_any_any = po2;
@@ -1899,7 +1899,7 @@ static int fpCreatePortGroups(
     /* UDP */
     po2 = PortObject2Dup(p->udp_anyany);
     if (po2 == NULL )
-        FatalError("Could not create a PortObject version 2 for udp-any-any rules\n!");
+        FatalError("Could not create a PortObject version 2 for udp-any-any rules\n");
 
     if (!fpDetectSplitAnyAny(fp))
         add_any_any = po2;
@@ -1940,7 +1940,7 @@ static int fpCreatePortGroups(
     /* ICMP */
     po2 = PortObject2Dup(p->icmp_anyany);
     if (po2 == NULL)
-        FatalError("Could not create a PortObject version 2 for icmp-any-any rules\n!");
+        FatalError("Could not create a PortObject version 2 for icmp-any-any rules\n");
 
     if (!fpDetectSplitAnyAny(fp))
         add_any_any = po2;
@@ -1981,7 +1981,7 @@ static int fpCreatePortGroups(
     /* IP */
     po2 = PortObject2Dup(p->ip_anyany);
     if (po2 == NULL)
-        FatalError("Could not create a PortObject version 2 for ip-any-any rules\n!");
+        FatalError("Could not create a PortObject version 2 for ip-any-any rules\n");
 
     if (!fpDetectSplitAnyAny(fp))
         add_any_any = po2;
@@ -2217,7 +2217,7 @@ void fpBuildServicePortGroups(
                 id = AddProtocolReference(srvc);
 
                 if(id <=0 )
-                    FatalError("Could not AddProtocolReference!\n");
+                    FatalError("Could not AddProtocolReference\n");
 
                 else if( id >= MAX_PROTOCOL_ORDINAL )
                     ParseWarning("protocol-ordinal=%d exceeds "
@@ -2237,12 +2237,12 @@ void fpBuildServicePortGroups(
             else /* id < 0 */
             {
                 ParseError("adding protocol-ordinal=%d for "
-                    "service=%s, can't use that !!!\n",id,srvc);
+                    "service=%s, can't use that\n",id,srvc);
             }
         }
         else
         {
-            ParseError("*** failed to create and find a port group for '%s' !!! \n",srvc );
+            ParseError("*** failed to create and find a port group for '%s'\n",srvc );
         }
     }
 }
index 1c892b973c6ee95e4129f082e644340546e0da65..aed7bb1aca57c129ac7421402cb84357d794b86f 100644 (file)
@@ -607,7 +607,7 @@ void parse_file_rule(const char *args, void **conf)
 
     if (file_config->FileRules[rule->id])
     {
-        ParseError("file type: duplicated rule id %d defined!", rule->id);
+        ParseError("file type: duplicated rule id %d defined", rule->id);
         free(rule);
         return;
     }
index 2e1079cbb8bd9eccd533e7b3287991b6d069d440..02c91cd052536e66c3706d3f07035d927b63a536 100644 (file)
@@ -226,7 +226,7 @@ const char* file_info_from_ID(void* conf, uint32_t id)
     RuleInfo *info;
 
     if (SNORT_FILE_TYPE_UNKNOWN == id)
-        return "Unknown file type, done!";
+        return "Unknown file type, done";
 
     else if (SNORT_FILE_TYPE_CONTINUE == id)
         return "Undecided file type, continue...";
index ac11faa0326672174a7b7eb3362717140e22c836..40275a21f763c02b210d81e8a81cf27935142e16 100644 (file)
@@ -1257,7 +1257,7 @@ int main ( int argc, char ** argv )
                      1);      /* Recycle nodes */
     if(!t)
     {
-        printf("Low Memory!\n");
+        printf("Low Memory\n");
         exit(0);
     }
     /* Add Nodes to the Hash Table */
@@ -1301,7 +1301,7 @@ int main ( int argc, char ** argv )
         */
         if( sfxhash_remove(t,n->key) )
         {
-            printf("...ERROR: Could not remove the key node!\n");
+            printf("...ERROR: Could not remove the key node\n");
         }
         else
         {
index 9600e5b2737c7f82807c772f01e2c53c703230c9..1045006c1b7ed0924d98b1d1a7487ba1d82be8ab 100644 (file)
@@ -1012,7 +1012,7 @@ int asn1_print_types(ASN1_TYPE *asn1_type, void *user)
     printf("\n");
     //if(BitStringOverflow(asn1_type))
     //{
-    //    printf("!! BITSTRING OVERFLOW\n");
+    //    printf("BITSTRING OVERFLOW\n");
     //}
     printf("\n");
 
index 406d5bb0382d1c7981ec4c751c3cddb2e734069a..22cbf0f81309cbf80c900835005c55990686c044 100644 (file)
@@ -585,7 +585,7 @@ static void parse_depth(PatternMatchData* pmd, const char *data)
         /* check to make sure that this the depth allows this rule to fire */
         if (pmd->depth < (int)pmd->pattern_size)
         {
-            ParseError("the depth (%d) is less than the size of the content(%u)!",
+            ParseError("the depth (%d) is less than the size of the content(%u)",
                     pmd->depth, pmd->pattern_size);
             return;
         }
index 2c80c25d4ff39cfc886a2585b7a151265a043bfc..74468e1ee15dbf8b5fb59ba7133550d391239ba2 100644 (file)
@@ -1497,7 +1497,7 @@ void LogNetData (TextLog* log, const uint8_t* data, const int len, Packet *p)
         {
             TextLog_Print(
                 log, "Got bogus buffer length (%d) for LogNetData, "
-                "defaulting to %d bytes!\n", len, BYTES_PER_FRAME
+                "defaulting to %d bytes\n", len, BYTES_PER_FRAME
             );
         }
         end = data + BYTES_PER_FRAME;
index 21048f22581b97dbcd449ce491e870d2bea965c9..572277dd75c3a76fa5750a1ad71873544da368f3 100644 (file)
@@ -88,7 +88,7 @@ TextLog* TextLog_Init (
 
     if ( !txt )
     {
-        FatalError("Unable to allocate a TextLog(%u)!\n", maxBuf);
+        FatalError("Unable to allocate a TextLog(%u)\n", maxBuf);
         return nullptr;
     }
     txt->name = name ? SnortStrdup(name) : NULL;
index 2d29746e6b53dbdf774c07b7672da2771e497ff6..ba6585ec9f745a137ebc5b51999100fddb0ac21e 100644 (file)
@@ -293,7 +293,7 @@ static void AlertSyslog(
     }
     else
     {
-        syslog(priority, "%s", msg == NULL ? "ALERT!" : msg);
+        syslog(priority, "%s", msg == NULL ? "ALERT" : msg);
     }
 }
 
index a30bacc3016f8cda1e7beb2529bcf23ea63b35e3..1ac51bcac3c5d8a77b20dd0e15f1b10a4f114a76 100644 (file)
@@ -211,7 +211,7 @@ static void OpenAlertSock(void)
     get_instance_file(name, UNSOCK_FILE);
 
     if ( access(name.c_str(), W_OK) )
-       ErrorMessage("%s file doesn't exist or isn't writable!\n", name.c_str());
+       ErrorMessage("%s file doesn't exist or isn't writable\n", name.c_str());
 
     memset((char *) &us.addr, 0, sizeof(us.addr));
     us.addr.sun_family = AF_UNIX;
index e004fe8cb6137459931f03bea61a439e45c598ba..04241a6157c43d7146600fb66f0e1c6a67ae7090 100644 (file)
@@ -941,7 +941,7 @@ static void Unified2Write(uint8_t *buf, uint32_t buf_len, Unified2Config *config
                     if (((fwcount = fwrite(buf, (size_t)buf_len, 1, u2.stream)) == 1) &&
                         ((ffstatus = fflush(u2.stream)) == 0))
                     {
-                        ErrorMessage("%s(%d) Write to unified2 file succeeded!\n",
+                        ErrorMessage("%s(%d) Write to unified2 file succeeded\n",
                                      __FILE__, __LINE__);
                         error = 0;
                         break;
@@ -949,7 +949,7 @@ static void Unified2Write(uint8_t *buf, uint32_t buf_len, Unified2Config *config
                 }
                 else if ((ffstatus = fflush(u2.stream)) == 0)
                 {
-                    ErrorMessage("%s(%d) Write to unified2 file succeeded!\n",
+                    ErrorMessage("%s(%d) Write to unified2 file succeeded\n",
                                  __FILE__, __LINE__);
                     error = 0;
                     break;
@@ -993,7 +993,7 @@ static void Unified2Write(uint8_t *buf, uint32_t buf_len, Unified2Config *config
                     if (((fwcount = fwrite(buf, (size_t)buf_len, 1, u2.stream)) == 1) &&
                         ((ffstatus = fflush(u2.stream)) == 0))
                     {
-                        ErrorMessage("%s(%d) Write to unified2 file succeeded!\n",
+                        ErrorMessage("%s(%d) Write to unified2 file succeeded\n",
                                      __FILE__, __LINE__);
                         error = 0;
                         break;
index 3d098ffcffe5df653d00b1175b79e9e020a5f051..9365e608178296f25bc59fda1bcfb36b2672adb4 100644 (file)
@@ -643,7 +643,7 @@ static bool set_mode()
     if ( ScTestMode() ||
         (!Trough_GetQCount() && !(snort_conf->run_flags & RUN_FLAG__SHELL)) )
     {
-        LogMessage("\nSnort successfully validated the configuration!\n");
+        LogMessage("\nSnort successfully validated the configuration.\n");
 
         // force test mode to exit w/o stats
         snort_conf->run_flags |= RUN_FLAG__TEST;
index 4537fd88c9f9148a35515bd1588932865e311694..d43b4cae7c6cbb4b8e2f538e67e85dff0d4ce8cd 100644 (file)
@@ -1276,19 +1276,18 @@ bool ProcessModule::end(const char* fqn, int idx, SnortConfig* sc)
         if (cpu == -1)
         {
             ParseError("%s - cpu(%d) for thread (%d) and source (%s) "
-            "must be an integer in the range "
-            "of 0 < cpu < max_cpus", fqn, cpu);
+                "must be an integer in the range of 0 < cpu < max_cpus", fqn, cpu);
             return false;
         }
         else if ((source.empty()) && (thread == -1))
         {
-            ParseError("%s - must have either a source or a thread!", fqn);
+            ParseError("%s - must have either a source or a thread", fqn);
             return false;
         }
         else if ((!source.empty()) && (thread >= 0))
         {
-            ParseError("%s - must have either a source or a thread!"
-                " Both thread(%d) and source(%s) are set", fqn, thread, source.c_str());
+            ParseError("%s - cannot set both thread(%d) and source(%s)",
+                fqn, thread, source.c_str());
             return false;
         }
 
index 11ae08c825f27a5449ddcf1b48b8bb73d8dc1dcb..8556df544ec76045a8e06dbae31099419495fc4c 100644 (file)
@@ -80,7 +80,7 @@ bool set_cpu_affinity(SnortConfig* sc, const std::string& str, int cpu)
 
     auto search = sa.find(str);
     if(search != sa.end())
-        ParseError("Multiple CPU's set for interface %s", str.c_str());
+        ParseError("multiple CPUs set for interface %s", str.c_str());
 
     sa[std::string(str)] = cpu;
     return false;
@@ -126,42 +126,39 @@ void pin_thread_to_cpu(const char* source)
         cpu = ta[instance_id];
     }
 
+    if ( cpu < 0 )
+        return;
 
-    if (cpu != -1)
+#if LINUX
+    static THREAD_LOCAL cpu_set_t cpu_set;
+
+    if (cpu >= CPU_SETSIZE)
+        FatalError("Maximum CPU value for this Operating System is %d",
+            CPU_SETSIZE);
+
+    CPU_ZERO(&cpu_set);
+
+    if (!sched_getaffinity(0, sizeof(cpu_set), &cpu_set))
+        if (!CPU_ISSET(cpu, &cpu_set))
+            FatalError("CPU %d is not part of source %s's and thread "
+                "%d's CPU set\n", cpu, source, instance_id);
+
+    CPU_ZERO(&cpu_set);
+    CPU_SET(cpu, &cpu_set);
+
+    if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set))
+        FatalError("Unable to pin source %s to CPU %d: %s\n",
+            source, cpu, std::strerror(errno));
+#else
+    static bool warning_printed = false;
+
+    if (!warning_printed)
     {
-// PREPROCESSOR MACROS -- these are not actually if statements!
-#       if LINUX
-        {
-            static THREAD_LOCAL cpu_set_t cpu_set;
-
-            if (cpu >= CPU_SETSIZE)
-                FatalError("Maximum CPU value for this Operating System is %d",
-                    CPU_SETSIZE);
-
-            CPU_ZERO(&cpu_set);
-            if (!sched_getaffinity(0, sizeof(cpu_set), &cpu_set))
-                if (!CPU_ISSET(cpu, &cpu_set))
-                    FatalError("CPU %d is not part of source %s's and thread "
-                        "%d's CPU set!\n", cpu, source, instance_id);
-
-            CPU_ZERO(&cpu_set);
-            CPU_SET(cpu, &cpu_set);
-            if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set))
-                FatalError("Unable to pin source %s to CPU %d! %s\n", source, cpu, std::strerror(errno));
-
-        }
-#       else
-        {
-            static bool warning_printed = false;
-            if (!warning_printed)
-            {
-                WarningMessage("Thread Pinning / CPU affinity support is currently"
-                    " unsupported for this Operating System");
-                warning_printed = true;
-            }
-        }
-#       endif
+        WarningMessage("Thread Pinning / CPU affinity support is currently"
+            " unsupported for this Operating System");
+        warning_printed = true;
     }
+#endif
 }
 
 //-------------------------------------------------------------------------
index a17f1fcaa68c31036cda819cdc122b83ad126e7c..391bdd4283372a2b42da7b11152d498f5e019908 100644 (file)
@@ -89,17 +89,17 @@ CodecManager::CodecApiWrapper& CodecManager::get_api_wrapper(const CodecApi* cd_
 
 
     ParseAbort("Attempting to instantiate Codec '%s', "
-                "but codec has not been added!!", cd_api->base.name);
+                "but codec has not been added", cd_api->base.name);
 }
 
 
 void CodecManager::add_plugin(const CodecApi* api)
 {
     if (!api->ctor)
-        FatalError("CodecApi ctor() for Codec %s: ctor() must be implemented!!\n",
+        FatalError("CodecApi ctor() for Codec %s: ctor() must be implemented\n",
                         api->base.name);
     if (!api->dtor)
-        FatalError("CodecApi ctor() for Codec %s: ctor() must be implemented!!\n",
+        FatalError("CodecApi ctor() for Codec %s: ctor() must be implemented\n",
                         api->base.name);
 
     CodecApiWrapper wrap;
@@ -227,7 +227,7 @@ void CodecManager::thread_init()
     }
 
     if(!grinder)
-        FatalError("PacketManager: Unable to find a Codec with data link type %d!!\n", daq_dlt);
+        FatalError("PacketManager: Unable to find a Codec with data link type %d\n", daq_dlt);
 
     if ( !ScReadMode() || ScPcapShow() )
         LogMessage("Decoding with %s\n", s_protocols[grinder]->get_name());
index a34ef1f40e927d292b835ad004e9e36d59eb2b2d..c6573a0b07a2388f8b1f65b9fa657bee7c360a27 100644 (file)
@@ -495,7 +495,7 @@ void test_ip4_parsing(void)
             printf("%c", not_flag ? '!' : ' ');
             printf("%s/", inet_ntoa(*(struct in_addr *) &host));
             printf("%s", inet_ntoa(*(struct in_addr *) &mask));
-            printf(" parsed successfully!\n");
+            printf(" parsed successfully\n");
         }
 
         /* host byte order stuff */
index 0df72fa7c14df3fb3f2b646ffd22d4ecefeba271..4d1ce1eb1d6db18da607ee3ee8a56aaee56c37c6 100644 (file)
@@ -418,7 +418,7 @@ static int Active_Open (const char* dev)
         s_link = eth_open(dev);
 
         if ( !s_link )
-            FatalError("%s: can't open %s!\n",
+            FatalError("%s: can't open %s\n",
                 "Active response", dev);
         s_send = Active_SendEth;
     }
@@ -427,7 +427,7 @@ static int Active_Open (const char* dev)
         s_ipnet = ip_open();
 
         if ( !s_ipnet )
-            FatalError("%s: can't open ip!\n",
+            FatalError("%s: can't open ip\n",
                 "Active response");
         s_send = Active_SendIp;
     }
index 7ac9065cb96446f835592a341b42116b064cae82..5240cb57c3f9071a5151449185a5ee90619d4fe1 100644 (file)
@@ -162,11 +162,11 @@ DAQ_Mode DAQ_GetMode (const SnortConfig* sc)
             if ( !strcasecmp(daq_mode_string((DAQ_Mode)i), sc->daq_mode) )
             {
                 if ( ScAdapterInlineMode() && (i != DAQ_MODE_INLINE) )
-                    FatalError("DAQ '%s' mode incompatible with -Q!\n", sc->daq_mode);
+                    FatalError("DAQ '%s' mode incompatible with -Q\n", sc->daq_mode);
                 return (DAQ_Mode)i;
             }
         }
-        FatalError("Bad DAQ mode '%s'!\n", sc->daq_mode);
+        FatalError("Bad DAQ mode '%s'\n", sc->daq_mode);
     }
     if ( ScAdapterInlineMode() )
         return DAQ_MODE_INLINE;
@@ -240,7 +240,7 @@ void DAQ_Init (const SnortConfig* sc)
     daq_mod = daq_find_module(type);
 
     if ( !daq_mod )
-        FatalError("Can't find %s DAQ!\n", type);
+        FatalError("Can't find %s DAQ\n", type);
 
     snap = ( sc->pkt_snaplen > 0 ) ? sc->pkt_snaplen : PKT_SNAPLEN;
     daq_mode = DAQ_GetMode(sc);
@@ -350,7 +350,7 @@ int DAQ_SetFilter(const char* bpf)
     bpf_gate.unlock();
 
     if ( err )
-        FatalError("Can't set DAQ BPF filter to '%s' (%s)!\n",
+        FatalError("Can't set DAQ BPF filter to '%s' (%s)\n",
             bpf, daq_get_error(daq_mod, daq_hand));
 
     return err;
@@ -409,7 +409,7 @@ int DAQ_New (const SnortConfig* sc, const char* intf)
     DAQ_Config_t cfg;
 
     if ( !daq_mod )
-        FatalError("DAQ_Init not called!\n");
+        FatalError("DAQ_Init not called\n");
 
     if ( intf )
         interface_spec = SnortStrdup(intf);
@@ -471,7 +471,7 @@ int DAQ_Start ()
     int err = daq_start(daq_mod, daq_hand);
 
     if ( err )
-        FatalError("Can't start DAQ (%d) - %s!\n",
+        FatalError("Can't start DAQ (%d) - %s\n",
             err, daq_get_error(daq_mod, daq_hand));
 
     else if ( !DAQ_UnprivilegedStart() )
@@ -497,7 +497,7 @@ int DAQ_Stop ()
     int err = daq_stop(daq_mod, daq_hand);
 
     if ( err )
-        LogMessage("Can't stop DAQ (%d) - %s!\n",
+        LogMessage("Can't stop DAQ (%d) - %s\n",
             err, daq_get_error(daq_mod, daq_hand));
 
     return err;
@@ -522,7 +522,7 @@ int DAQ_Acquire (int max, DAQ_Analysis_Func_t callback, uint8_t* user)
 #endif
 
     if ( err && err != DAQ_READFILE_EOF )
-        LogMessage("Can't acquire (%d) - %s!\n",
+        LogMessage("Can't acquire (%d) - %s\n",
             err, daq_get_error(daq_mod, daq_hand));
 
     if ( s_error != DAQ_SUCCESS )
@@ -538,7 +538,7 @@ int DAQ_Inject(const DAQ_PktHdr_t* h, int rev, const uint8_t* buf, uint32_t len)
     int err = daq_inject(daq_mod, daq_hand, (DAQ_PktHdr_t*)h, buf, len, rev);
 #ifdef DEBUG
     if ( err )
-        LogMessage("Can't inject (%d) - %s!\n",
+        LogMessage("Can't inject (%d) - %s\n",
             err, daq_get_error(daq_mod, daq_hand));
 #endif
     return err;
@@ -581,7 +581,7 @@ const DAQ_Stats_t* DAQ_GetStats (void)
     err = daq_get_stats(daq_mod, daq_hand, &daq_stats);
 
     if ( err )
-        LogMessage("Can't get DAQ stats (%d) - %s!\n",
+        LogMessage("Can't get DAQ stats (%d) - %s\n",
             err, daq_get_error(daq_mod, daq_hand));
 
     if ( !daq_stats.hw_packets_received )
index dfb3e2f9f0a55c4bf179bd794057c758f79ce6a9..eff77dc66dd63c0c7c56e6459e4b521311b5e45f 100644 (file)
@@ -497,7 +497,7 @@ VarEntry * VarDefine(
 
     if(value == NULL)
     {
-        ParseAbort("bad value in variable definition!  Make sure you don't "
+        ParseAbort("bad value in variable definition.  Make sure you don't "
                    "have a '$' in the var name.");
     }
 
@@ -533,7 +533,7 @@ VarEntry * VarDefine(
                     break;
 
                 case SFIP_NOT_ANY:
-                    ParseAbort("!any is not allowed in %s.", name);
+                    ParseAbort("!any is not allowed in %s", name);
                     break;
 
                 default:
index 47d0ece8dcbdb1a0356bd16323aa46e7008b74fb..83be08ae67ad1ebce76538e0fd214fd8d0b86046 100644 (file)
@@ -68,7 +68,7 @@
 #include "util.h"
 #include "main/thread.h"
 
-#define MEMASSERT(p,s) if(!p){fprintf(stderr,"ACSM-No Memory: %s!\n",s);exit(0);}
+#define MEMASSERT(p,s) if(!p){fprintf(stderr,"ACSM-No Memory: %s\n",s);exit(0);}
 
 #ifdef DEBUG_AC
 static int max_memory = 0;
index 45abaf45d7f80eb07ef09174effedc3279e5fb1c..905c906a7afad420f8a329d1c287155959da0d54 100644 (file)
 
 #define printf LogMessage
 
-#define MEMASSERT(p,s) if(!p){FatalError("ACSM-No Memory: %s!\n",s);}
+#define MEMASSERT(p,s) if(!p){FatalError("ACSM-No Memory: %s\n",s);}
 
 static int acsm2_total_memory = 0;
 static int acsm2_pattern_memory = 0;
index d994557dfc5d85b4c19fe5a732143043f37c6549..13f7dd8d0c889aa506ce1e2e5f7717a2d1fe4e24 100644 (file)
@@ -56,7 +56,7 @@
 
 #include "hi_util_xmalloc.h"
 
-//#define MEMASSERT(p) if(!p){printf("KMAP-No Memory: File: %s Line:%d!\n",__FILE__,__LINE__);exit(0);}
+//#define MEMASSERT(p) if(!p){printf("KMAP-No Memory: File: %s Line:%d\n",__FILE__,__LINE__);exit(0);}
 #define MEMASSERT(p)
 
 
index 4c8923e91d5cfec4d045e64aeec4c82abd88b5a0..ac4782ab7b2ea15c609b7051eafa5da3ecf8dbd6 100644 (file)
@@ -56,7 +56,7 @@
 
 #include "hi_util_xmalloc.h"
 
-//#define MEMASSERT(p) if(!p){printf("KMAP-No Memory: File: %s Line:%d!\n",__FILE__,__LINE__);exit(0);}
+//#define MEMASSERT(p) if(!p){printf("KMAP-No Memory: File: %s Line:%d\n",__FILE__,__LINE__);exit(0);}
 #define MEMASSERT(p)
 
 /*
index 1155fca083d4c0becdd421f2de448a26593cb04d..41c4a3fad2bfbc6399e5ccbf8dfea4887cc51222 100644 (file)
@@ -233,7 +233,7 @@ static THREAD_LOCAL Packet** defrag_pkts;  // An array of Packet pointers
 /* enum for policy names */
 static const char *frag_policy_names[] =
 {
-    "no policy!",
+    "no policy",
     "FIRST",
     "LINUX",
     "BSD",
index e5dee3541c33ff87eb8590a66db35cec9ba70448..beddc1220140e012fe44ffcbc498832b2d3a1f65 100644 (file)
@@ -409,7 +409,7 @@ void s5TcpStreamReassembleRuleOptionCleanup(void *dataPtr);
 
 /* enum for policy names */
 static const char *reassembly_policy_names[] = {
-    "no policy!",
+    "no policy",
     "FIRST",
     "LINUX",
     "BSD",
@@ -3083,7 +3083,7 @@ static int AddStreamNode(
                         i, idx, idx->seq, idx->size, idx->next, idx->prev););
 
                 if(st->seg_count < i)
-                    FatalError("Circular list, WTF?\n");
+                    FatalError("Circular list\n");
 
                 idx = idx->next;
             }
index bbfae43ecaaa4820635c56cacaf799a8011c47d4..4a4cfb6f7c1782d5686079b80397cd5c4397f6c9 100644 (file)
@@ -337,7 +337,9 @@ int mSearchREG(
                     }
                 }
 
-               DEBUG_WRAP(DebugMessage(DEBUG_PATTERN_MATCH, "got wildcard final char match! (b[%d]: %c -> p[%d]: %c\n", b_idx, buf[b_idx], p_idx, ptrn[p_idx]););
+               DEBUG_WRAP(DebugMessage(DEBUG_PATTERN_MATCH, 
+            "got wildcard final char match! (b[%d]: %c -> p[%d]: %c\n",
+            b_idx, buf[b_idx], p_idx, ptrn[p_idx]););
             }
 
             if(p_idx == 0)
index 146e253ceba4b7cdddf34a5c3591afa2e5a8b460..e90975aad05440f4e25123146c20adc9b1808c5e 100644 (file)
@@ -2459,7 +2459,8 @@ int PortTableConsistencyCheck( PortTable *p )
         }
     }
 
-    DEBUG_WRAP(DebugMessage(DEBUG_PORTLISTS,"***\n***Port Table Compiler Consistency Check Phase-I Passed !\n"););
+    DEBUG_WRAP(DebugMessage(DEBUG_PORTLISTS,
+        "***\n***Port Table Compiler Consistency Check Phase-I Passed !\n"););
 
 
     /*
@@ -2492,7 +2493,7 @@ int PortTableConsistencyCheck( PortTable *p )
                 case PORT_OBJECT_PORT:
                 if( _po2_include_po_rules( p->pt_port_object[ poi->lport ], ipo  ) )
                 {
-                    FatalError("InputPortObject<->CompositePortObject consistency Check II failed!\n");
+                    FatalError("InputPortObject<->CompositePortObject consistency Check II failed\n");
                 }
                 break;
 
@@ -2505,7 +2506,7 @@ int PortTableConsistencyCheck( PortTable *p )
                         {
                             if( _po2_include_po_rules( p->pt_port_object[ i ], ipo  ) )
                             {
-                                FatalError("InputPortObject<->CompositePortObject consistency Check II failed!\n");
+                                FatalError("InputPortObject<->CompositePortObject consistency Check II failed\n");
                             }
                             lastpo = p->pt_port_object[ i ];
                         }
index 589c0c4f612291a3e0cf343c2541c091e3c242d3..33fcb48fa8b00ce423b12488348f0a2730569e15 100644 (file)
@@ -763,14 +763,14 @@ char * SnortStrdup(const char *str)
 
     if (!str)
     {
-        FatalError("Unable to duplicate string: NULL!\n");
+        FatalError("Unable to duplicate string: NULL\n");
     }
 
     copy = strdup(str);
 
     if (copy == NULL)
     {
-        FatalError("Unable to duplicate string: %s!\n", str);
+        FatalError("Unable to duplicate string: %s\n", str);
     }
 
     return copy;
index 6b0be924053ee2846a86eae43884f10dc3d4332f..6e64882c7251c67a92a388ad7287c1b14d5fc6e2 100644 (file)
@@ -130,7 +130,7 @@ static inline void* SnortAlloc (unsigned long size)
         return pv;
 
     // FIXIT-M do not FatalError() on runtime allocation failures
-    FatalError("Unable to allocate memory (%lu requested)\n", size);
+    FatalError("Unable to allocate memory (%lu requested)\n", size);
 
     return NULL;
 }