]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2632 in SNORT/snort3 from ~MMATIRKO/snort3:rna_tabs to master
authorMasud Hasan (mashasan) <mashasan@cisco.com>
Fri, 20 Nov 2020 16:51:03 +0000 (16:51 +0000)
committerMasud Hasan (mashasan) <mashasan@cisco.com>
Fri, 20 Nov 2020 16:51:03 +0000 (16:51 +0000)
Squashed commit of the following:

commit c5b2f7783477161450f5188f0eeaf783557c5956
Author: Michael Matirko <mmatirko@cisco.com>
Date:   Fri Nov 20 09:48:36 2020 -0500

    rna: replace some tabs with spaces as per style guidelines

src/network_inspectors/rna/rna_module.cc

index 46d61e97e475f5b573097dfbd1285e267e0cb08a..7f000ebf1bb56b32d3a9b4c10b5d381bde0b54c9 100644 (file)
@@ -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)