From b28f4666f9d039953021e614f8d3f38262c9f3d4 Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 20 Jul 2012 15:59:02 +0200 Subject: [PATCH] 0023337: The 'strcmp' function returns 0 if corresponding strings are equal. (1) Checking if the return value from 'strcmp' is '0'. --- src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx index 58df069ff8..218b5b3151 100755 --- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx @@ -93,26 +93,26 @@ Standard_Boolean IGESGraph_ToolDrawingUnits::OwnCorrect Standard_CString unm = ""; if (!ent->Unit().IsNull()) unm = ent->Unit()->ToCString(); switch (unf) { - case 1 : if (strcmp(unm,"IN") && strcmp(unm,"INCH")) + case 1 : if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0)) name = new TCollection_HAsciiString ("IN"); break; - case 2 : if (strcmp(unm,"MM")) + case 2 : if (strcmp(unm,"MM") == 0) name = new TCollection_HAsciiString ("MM"); break; case 3 : break; // nom libre - case 4 : if (strcmp(unm,"FT")) + case 4 : if (strcmp(unm,"FT") == 0) name = new TCollection_HAsciiString ("FT"); break; - case 5 : if (strcmp(unm,"MI")) + case 5 : if (strcmp(unm,"MI") == 0) name = new TCollection_HAsciiString ("MI"); break; - case 6 : if (strcmp(unm,"M")) + case 6 : if (strcmp(unm,"M") == 0) name = new TCollection_HAsciiString ("M"); break; - case 7 : if (strcmp(unm,"KM")) + case 7 : if (strcmp(unm,"KM") == 0) name = new TCollection_HAsciiString ("KM"); break; - case 8 : if (strcmp(unm,"MIL")) + case 8 : if (strcmp(unm,"MIL") == 0) name = new TCollection_HAsciiString ("MIL"); break; - case 9 : if (strcmp(unm,"UM")) + case 9 : if (strcmp(unm,"UM") == 0) name = new TCollection_HAsciiString ("UM"); break; - case 10 : if (strcmp(unm,"CM")) + case 10 : if (strcmp(unm,"CM") == 0) name = new TCollection_HAsciiString ("CM"); break; - case 11 : if (strcmp(unm,"UIN")) + case 11 : if (strcmp(unm,"UIN") == 0) name = new TCollection_HAsciiString ("UIN"); break; default : break; // on ne peut rien faire ... ? }