0023266: cppcheck warning: Logical disjunction always evaluates to true
authorika <ika@opencascade.com>
Tue, 9 Oct 2012 14:00:27 +0000 (18:00 +0400)
committerika <ika@opencascade.com>
Fri, 12 Oct 2012 10:19:50 +0000 (14:19 +0400)
Logical disjunction changed to  Logical conjunction, it evaluates true only then number of parameters isn't right.

src/QANewDBRepNaming/QANewDBRepNaming_FeatureCommands.cxx

index 001547b..f4f00ca 100755 (executable)
@@ -101,7 +101,7 @@ static Standard_Integer QANewDBRepNaming_NameBooleanOperationFeat (Draw_Interpre
                                                              Standard_Integer nb, 
                                                              const char ** arg)
 {
-  if (nb != 6 || nb != 7) {
+  if (nb != 6 && nb != 7) {
     di <<  "QANewDBRepNaming_NameBooleanOperationFeat : Error"  << "\n";
     return 1;
   }