@@ -85,7 +85,9 @@ SCIP_Bool checkAndUpdateFilesize(
85
85
{
86
86
if ( certificate->filesize < certificate->maxfilesize )
87
87
certificate->filesize += nchars/(SCIP_MB_TO_CHAR_RATE);
88
- return certificate->filesize < certificate->maxfilesize ;
88
+ if ( certificate->filesize < certificate->maxfilesize )
89
+ return TRUE ;
90
+ return FALSE ;
89
91
}
90
92
91
93
/* * checks whether node is a left node or not */
@@ -816,7 +818,7 @@ SCIP_RETCODE SCIPcertificateExit(
816
818
817
819
if ( certificate->origfile != NULL )
818
820
{
819
- SCIP_Bool printingaborted = ! checkAndUpdateFilesize (certificate, 0 );
821
+ SCIP_Bool printingaborted = checkAndUpdateFilesize (certificate, 0 ) ? FALSE : TRUE ;
820
822
821
823
SCIPmessagePrintVerbInfo (messagehdlr, set->disp_verblevel , SCIP_VERBLEVEL_NORMAL,
822
824
" closing certificate file (wrote approx. %.1f MB%s)\n " , certificate->filesize ,
@@ -896,8 +898,9 @@ SCIP_Bool SCIPcertificateIsEnabled(
896
898
SCIP_CERTIFICATE* certificate /* *< certificate information */
897
899
)
898
900
{
899
- return certificate != NULL && certificate->transfile != NULL && certificate->origfile != NULL
900
- && certificate->derivationfile != NULL ;
901
+ if ( certificate != NULL && certificate->transfile != NULL && certificate->origfile != NULL && certificate->derivationfile != NULL )
902
+ return TRUE ;
903
+ return FALSE ;
901
904
}
902
905
903
906
/* * returns current certificate file size in MB */
@@ -935,26 +938,26 @@ SCIP_Bool SCIPcertificateEnsureLastBoundInfoConsistent(
935
938
SCIP_Bool consistent;
936
939
937
940
if ( !SCIPcertificateIsEnabled (certificate) )
938
- return true ;
941
+ return TRUE ;
939
942
940
943
assert (certificate != NULL );
941
944
942
945
consistent = certificate->lastinfo ->isbound ;
943
- consistent = consistent && certificate->lastinfo ->varindex == SCIPvarGetCertificateIndex (var);
946
+ consistent = consistent && certificate->lastinfo ->varindex == SCIPvarGetCertificateIndex (var); /* lint !e1785 */
944
947
if ( boundtype == SCIP_BOUNDTYPE_LOWER )
945
948
{
946
- consistent = consistent && certificate->lastinfo ->boundtype == SCIP_BOUNDTYPE_LOWER;
947
- consistent = consistent && SCIPrationalRoundReal (certificate->lastinfo ->boundval , SCIP_R_ROUND_DOWNWARDS) >= newbound;
949
+ consistent = consistent && certificate->lastinfo ->boundtype == SCIP_BOUNDTYPE_LOWER; /* lint !e1785 */
950
+ consistent = consistent && SCIPrationalRoundReal (certificate->lastinfo ->boundval , SCIP_R_ROUND_DOWNWARDS) >= newbound; /* lint !e1785 */
948
951
}
949
952
else
950
953
{
951
- consistent = consistent && certificate->lastinfo ->boundtype == SCIP_BOUNDTYPE_UPPER;
952
- consistent = consistent && SCIPrationalRoundReal (certificate->lastinfo ->boundval , SCIP_R_ROUND_UPWARDS) <= newbound;
954
+ consistent = consistent && certificate->lastinfo ->boundtype == SCIP_BOUNDTYPE_UPPER; /* lint !e1785 */
955
+ consistent = consistent && SCIPrationalRoundReal (certificate->lastinfo ->boundval , SCIP_R_ROUND_UPWARDS) <= newbound; /* lint !e1785 */
953
956
}
954
- consistent = consistent && (!needsglobal || certificate->lastinfo ->isglobal );
955
- consistent = consistent && certificate->lastinfo ->certificateindex == certificate->indexcounter - 1 ;
956
- return consistent;
957
+ consistent = consistent && (!needsglobal || certificate->lastinfo ->isglobal ); /* lint !e1785*/
958
+ consistent = consistent && certificate->lastinfo ->certificateindex == certificate->indexcounter - 1 ; /* lint !e1785*/
957
959
960
+ return consistent;
958
961
}
959
962
#endif
960
963
@@ -1221,8 +1224,6 @@ SCIP_RETCODE SCIPcertificatePrintProofRational(
1221
1224
int len = SCIPrationalStrLen (val) + 1 ;
1222
1225
char * buffer = NULL ;
1223
1226
1224
- assert (len <= INT_MAX);
1225
-
1226
1227
/* check whether certificate output should be created */
1227
1228
if ( !SCIPcertificateIsEnabled (certificate) )
1228
1229
return SCIP_OKAY;;
@@ -3350,7 +3351,7 @@ SCIP_RETCODE SCIPcertificatePrintCutoffConflictingBounds(
3350
3351
SCIPrationalDiv (ub, ub, var->exactdata ->aggregate .scalar );
3351
3352
3352
3353
assert (SCIPrationalIsZero (var->exactdata ->aggregate .constant ));
3353
- SCIP_Bool swapBounds = ! SCIPrationalIsPositive (var->exactdata ->aggregate .scalar );
3354
+ SCIP_Bool swapBounds = SCIPrationalIsPositive (var->exactdata ->aggregate .scalar ) ? FALSE : TRUE ;
3354
3355
SCIP_CALL ( SCIPcertificatePrintCutoffConflictingBounds (scip, certificate, var->data .aggregate .var , swapBounds ? ub : lb, swapBounds ? lb : ub, swapBounds ? ubindex : lbindex, swapBounds ? lbindex : ubindex) );
3355
3356
if ( lb != NULL )
3356
3357
SCIPrationalMult (lb, lb, var->exactdata ->aggregate .scalar );
0 commit comments