From 6ecd18a8109e7dc6c8bbbaa8a9521a3d999ae7f2 Mon Sep 17 00:00:00 2001
From: Huib Jan van Langevelde <langevelde@jive.eu>
Date: Mon, 4 Apr 2005 09:12:17 +0000
Subject: [PATCH] %[ER:242]% some minor modifications: added comment, coding
 standard issues

---
 CEP/Demo/StationCorrelator/src/TH_RSP.cc | 13 +++++++------
 CEP/Demo/StationCorrelator/src/TH_RSP.h  |  4 ++--
 Demo/CEP/StationCorrelator/src/TH_RSP.cc | 13 +++++++------
 Demo/CEP/StationCorrelator/src/TH_RSP.h  |  4 ++--
 4 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/CEP/Demo/StationCorrelator/src/TH_RSP.cc b/CEP/Demo/StationCorrelator/src/TH_RSP.cc
index e9b48ce17a8..18ca6af654a 100644
--- a/CEP/Demo/StationCorrelator/src/TH_RSP.cc
+++ b/CEP/Demo/StationCorrelator/src/TH_RSP.cc
@@ -45,7 +45,6 @@
 
 #include <stdio.h>
 
-//#define DH_HEADERSIZE 44
 #define DH_HEADERSIZE 40
 #define DH_TAILSIZE 4
 
@@ -67,7 +66,6 @@ TH_RSP::TH_RSP(const string &ifname,
   
   itsSocketFD = -1;
   itsInitDone = false;
-
 }
 
 TH_RSP::~TH_RSP()
@@ -288,7 +286,6 @@ void TH_RSP::Init()
   }
   
   char ownMac[ETH_ALEN];
-  //if (strcmp(itsOwnMac,"" )== 0) {
   if (itsOwnMac == "") {
     // Find ownMAC address for specified interface
     // Mac address will be stored ownMac
@@ -306,7 +303,9 @@ void TH_RSP::Init()
     unsigned int ohx[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     sscanf(itsOwnMac.c_str(), "%x:%x:%x:%x:%x:%x", 
      &ohx[0],&ohx[1],&ohx[2],&ohx[3],&ohx[4],&ohx[5]);
-    for (int32 i=0;i<ETH_ALEN;i++) ownMac[i]=(char)ohx[i];
+    for (int32 i=0;i<ETH_ALEN;i++) {
+      ownMac[i]=(char)ohx[i];
+    }
   }
   
   // Convert _remoteMac HWADDR string to sll_addr
@@ -314,7 +313,9 @@ void TH_RSP::Init()
   uint32 rhx[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
   sscanf(itsRemoteMac.c_str(), "%x:%x:%x:%x:%x:%x", 
      &rhx[0],&rhx[1],&rhx[2],&rhx[3],&rhx[4],&rhx[5]);
-  for (int32 i=0;i<ETH_ALEN;i++) remoteMac[i]=(char)rhx[i];
+  for (int32 i=0;i<ETH_ALEN;i++) {
+    remoteMac[i]=(char)rhx[i];
+  }
   
   // Store the MAC addresses in the incoming packet filter, so
   // only packets from remoteMAC (source) to ownMAC (destination) 
@@ -380,7 +381,7 @@ void TH_RSP::Init()
   {
     LOG_ERROR_STR("TH_RSP: PROMISCUOUS mode failed.");
     close(itsSocketFD);
-   return;
+    return;
   }
 
   // fill in _sockaddr to be used in sendto calls
diff --git a/CEP/Demo/StationCorrelator/src/TH_RSP.h b/CEP/Demo/StationCorrelator/src/TH_RSP.h
index 72315c59736..957f1d44945 100644
--- a/CEP/Demo/StationCorrelator/src/TH_RSP.h
+++ b/CEP/Demo/StationCorrelator/src/TH_RSP.h
@@ -20,8 +20,8 @@
 //#
 //# $Id$
 
-#ifndef TRANSPORT_TH_ETHERNET_H
-#define TRANSPORT_TH_ETHERNET_H
+#ifndef TRANSPORT_TH_RSP_H
+#define TRANSPORT_TH_RSP_H
 
 // \file TH_RSP.h
 // Transport mechanism for Ethernet 
diff --git a/Demo/CEP/StationCorrelator/src/TH_RSP.cc b/Demo/CEP/StationCorrelator/src/TH_RSP.cc
index e9b48ce17a8..18ca6af654a 100644
--- a/Demo/CEP/StationCorrelator/src/TH_RSP.cc
+++ b/Demo/CEP/StationCorrelator/src/TH_RSP.cc
@@ -45,7 +45,6 @@
 
 #include <stdio.h>
 
-//#define DH_HEADERSIZE 44
 #define DH_HEADERSIZE 40
 #define DH_TAILSIZE 4
 
@@ -67,7 +66,6 @@ TH_RSP::TH_RSP(const string &ifname,
   
   itsSocketFD = -1;
   itsInitDone = false;
-
 }
 
 TH_RSP::~TH_RSP()
@@ -288,7 +286,6 @@ void TH_RSP::Init()
   }
   
   char ownMac[ETH_ALEN];
-  //if (strcmp(itsOwnMac,"" )== 0) {
   if (itsOwnMac == "") {
     // Find ownMAC address for specified interface
     // Mac address will be stored ownMac
@@ -306,7 +303,9 @@ void TH_RSP::Init()
     unsigned int ohx[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     sscanf(itsOwnMac.c_str(), "%x:%x:%x:%x:%x:%x", 
      &ohx[0],&ohx[1],&ohx[2],&ohx[3],&ohx[4],&ohx[5]);
-    for (int32 i=0;i<ETH_ALEN;i++) ownMac[i]=(char)ohx[i];
+    for (int32 i=0;i<ETH_ALEN;i++) {
+      ownMac[i]=(char)ohx[i];
+    }
   }
   
   // Convert _remoteMac HWADDR string to sll_addr
@@ -314,7 +313,9 @@ void TH_RSP::Init()
   uint32 rhx[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
   sscanf(itsRemoteMac.c_str(), "%x:%x:%x:%x:%x:%x", 
      &rhx[0],&rhx[1],&rhx[2],&rhx[3],&rhx[4],&rhx[5]);
-  for (int32 i=0;i<ETH_ALEN;i++) remoteMac[i]=(char)rhx[i];
+  for (int32 i=0;i<ETH_ALEN;i++) {
+    remoteMac[i]=(char)rhx[i];
+  }
   
   // Store the MAC addresses in the incoming packet filter, so
   // only packets from remoteMAC (source) to ownMAC (destination) 
@@ -380,7 +381,7 @@ void TH_RSP::Init()
   {
     LOG_ERROR_STR("TH_RSP: PROMISCUOUS mode failed.");
     close(itsSocketFD);
-   return;
+    return;
   }
 
   // fill in _sockaddr to be used in sendto calls
diff --git a/Demo/CEP/StationCorrelator/src/TH_RSP.h b/Demo/CEP/StationCorrelator/src/TH_RSP.h
index 72315c59736..957f1d44945 100644
--- a/Demo/CEP/StationCorrelator/src/TH_RSP.h
+++ b/Demo/CEP/StationCorrelator/src/TH_RSP.h
@@ -20,8 +20,8 @@
 //#
 //# $Id$
 
-#ifndef TRANSPORT_TH_ETHERNET_H
-#define TRANSPORT_TH_ETHERNET_H
+#ifndef TRANSPORT_TH_RSP_H
+#define TRANSPORT_TH_RSP_H
 
 // \file TH_RSP.h
 // Transport mechanism for Ethernet 
-- 
GitLab