From: Masud Hasan (mashasan) Date: Fri, 20 Nov 2020 16:51:03 +0000 (+0000) Subject: Merge pull request #2632 in SNORT/snort3 from ~MMATIRKO/snort3:rna_tabs to master X-Git-Tag: 3.0.3-6~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6926e2c8e43ba68f16520611e42fbe0c83664e4f;p=thirdparty%2Fsnort3.git Merge pull request #2632 in SNORT/snort3 from ~MMATIRKO/snort3:rna_tabs to master Squashed commit of the following: commit c5b2f7783477161450f5188f0eeaf783557c5956 Author: Michael Matirko Date: Fri Nov 20 09:48:36 2020 -0500 rna: replace some tabs with spaces as per style guidelines --- diff --git a/src/network_inspectors/rna/rna_module.cc b/src/network_inspectors/rna/rna_module.cc index 46d61e97e..7f000ebf1 100644 --- a/src/network_inspectors/rna/rna_module.cc +++ b/src/network_inspectors/rna/rna_module.cc @@ -114,18 +114,18 @@ static bool get_mac_from_args(lua_State* L, uint8_t* mac_addr) hex_parser >> tmp_byte; mac_addr[idx++] = (uint8_t) tmp_byte; - if ( hex_parser.fail() or tok.size() != 2 ) - { - LogMessage("Improperly formatted MAC address, use format " - "aa:bb:cc:dd:ee:ff\n"); - return false; - } + if ( hex_parser.fail() or tok.size() != 2 ) + { + LogMessage("Improperly formatted MAC address, use format " + "aa:bb:cc:dd:ee:ff\n"); + return false; + } hex_parser.str(string()); hex_parser.clear(); } - if ( idx != MAC_SIZE ) + if ( idx != MAC_SIZE ) { LogMessage("Improperly formatted MAC address, use format aa:bb:cc:dd:ee:ff\n"); return false; @@ -142,13 +142,13 @@ static int delete_mac_host(lua_State* L) { uint8_t mac[MAC_SIZE] = {0}; - const char* lua_in = luaL_optstring(L, 1, nullptr); + const char* lua_in = luaL_optstring(L, 1, nullptr); - if ( lua_in == nullptr ) - { - LogMessage("Usage: rna.delete_mac_host(mac)\n"); - return 0; - } + if ( lua_in == nullptr ) + { + LogMessage("Usage: rna.delete_mac_host(mac)\n"); + return 0; + } bool valid_mac = get_mac_from_args(L, mac); if (!valid_mac) @@ -175,13 +175,13 @@ static int delete_mac_host_proto(lua_State* L) { uint8_t mac[MAC_SIZE] = {0}; - const char* lua_in = luaL_optstring(L, 1, nullptr); + const char* lua_in = luaL_optstring(L, 1, nullptr); - if ( lua_in == nullptr ) - { - LogMessage("Usage: rna.delete_mac_host_proto(mac, proto)\n"); - return 0; - } + if ( lua_in == nullptr ) + { + LogMessage("Usage: rna.delete_mac_host_proto(mac, proto)\n"); + return 0; + } bool valid_mac = get_mac_from_args(L, mac); if (!valid_mac)