From fafad173eda8f045949ac09a55ad3f1bbf54fa8a Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 20 Jul 2012 14:56:44 +0200 Subject: [PATCH] 0023336: The 'strcmp' function returns 0 if corresponding strings are equal. Checking if the return value from 'strcmp' is '0'. --- src/RWStepShape/RWStepShape_RWAngularLocation.cxx | 6 +++--- src/RWStepShape/RWStepShape_RWAngularSize.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/RWStepShape/RWStepShape_RWAngularLocation.cxx b/src/RWStepShape/RWStepShape_RWAngularLocation.cxx index de17141f6f..2a7a3e6597 100755 --- a/src/RWStepShape/RWStepShape_RWAngularLocation.cxx +++ b/src/RWStepShape/RWStepShape_RWAngularLocation.cxx @@ -71,9 +71,9 @@ void RWStepShape_RWAngularLocation::ReadStep (const Handle(StepData_StepReaderDa StepShape_AngleRelator aAngleSelection = StepShape_Small; if (data->ParamType (num, 5) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 5); - if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal; - else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large; - else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small; + if (strcmp(text, ".EQUAL.") == 0) aAngleSelection = StepShape_Equal; + else if (strcmp(text, ".LARGE.") == 0) aAngleSelection = StepShape_Large; + else if (strcmp(text, ".SMALL.") == 0) aAngleSelection = StepShape_Small; else ach->AddFail("Parameter #5 (angle_selection) has not allowed value"); } else ach->AddFail("Parameter #5 (angle_selection) is not enumeration"); diff --git a/src/RWStepShape/RWStepShape_RWAngularSize.cxx b/src/RWStepShape/RWStepShape_RWAngularSize.cxx index eaed6f2ba4..d003d40183 100755 --- a/src/RWStepShape/RWStepShape_RWAngularSize.cxx +++ b/src/RWStepShape/RWStepShape_RWAngularSize.cxx @@ -60,9 +60,9 @@ void RWStepShape_RWAngularSize::ReadStep (const Handle(StepData_StepReaderData)& StepShape_AngleRelator aAngleSelection = StepShape_Small; if (data->ParamType (num, 3) == Interface_ParamEnum) { Standard_CString text = data->ParamCValue(num, 3); - if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal; - else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large; - else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small; + if (strcmp(text, ".EQUAL.") == 0) aAngleSelection = StepShape_Equal; + else if (strcmp(text, ".LARGE.") == 0) aAngleSelection = StepShape_Large; + else if (strcmp(text, ".SMALL.") == 0) aAngleSelection = StepShape_Small; else ach->AddFail("Parameter #3 (angle_selection) has not allowed value"); } else ach->AddFail("Parameter #3 (angle_selection) is not enumeration");