From a9591712595f8e031c0c2989063d5f8d05035300 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 21 May 2020 13:46:49 -0400 Subject: [PATCH] Fix #43, Resolve LGTM issues Added header guard Removed local parameter hiding global --- Subsystems/cmdUtil/SendUdp.h | 5 +++++ Subsystems/cmdUtil/cmdUtil.c | 4 ++-- Subsystems/cmdUtil/cmdUtil.sln | 21 --------------------- 3 files changed, 7 insertions(+), 23 deletions(-) delete mode 100644 Subsystems/cmdUtil/cmdUtil.sln diff --git a/Subsystems/cmdUtil/SendUdp.h b/Subsystems/cmdUtil/SendUdp.h index 11769bb..e0cd116 100644 --- a/Subsystems/cmdUtil/SendUdp.h +++ b/Subsystems/cmdUtil/SendUdp.h @@ -17,4 +17,9 @@ ** See the License for the specific language governing permissions and ** limitations under the License. */ +#ifndef _sendudp_ +#define _sendudp_ + int SendUdp(char *hostname, char *portNum, char *packetData, int packetSize); + +#endif /* _sendudp_ */ diff --git a/Subsystems/cmdUtil/cmdUtil.c b/Subsystems/cmdUtil/cmdUtil.c index 88df2d7..eed21d7 100644 --- a/Subsystems/cmdUtil/cmdUtil.c +++ b/Subsystems/cmdUtil/cmdUtil.c @@ -80,8 +80,7 @@ typedef struct /* ** Declare the global command data */ -CommandData_t CommandData; -int hostByteOrder; +int hostByteOrder; /* ** getopts parameter passing options string @@ -397,6 +396,7 @@ int main(int argc, char *argv[]) int longIndex = 0; int retStat; unsigned short tempShort; + CommandData_t CommandData; /* ** Initialize the CommandData struct diff --git a/Subsystems/cmdUtil/cmdUtil.sln b/Subsystems/cmdUtil/cmdUtil.sln deleted file mode 100644 index f7e39fa..0000000 --- a/Subsystems/cmdUtil/cmdUtil.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmdUtil", "cmdUtil.vcproj", "{601FB2A2-C148-4E7A-BC5B-7604457E4110}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {601FB2A2-C148-4E7A-BC5B-7604457E4110}.Debug.ActiveCfg = Debug|Win32 - {601FB2A2-C148-4E7A-BC5B-7604457E4110}.Debug.Build.0 = Debug|Win32 - {601FB2A2-C148-4E7A-BC5B-7604457E4110}.Release.ActiveCfg = Release|Win32 - {601FB2A2-C148-4E7A-BC5B-7604457E4110}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal