Skip to content

Commit 5e8f82c

Browse files
committed
docs
1 parent 91f0945 commit 5e8f82c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mmpars.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,12 +2731,15 @@ char parseProof(long statemNum)
27312731
return returnFlag;
27322732
} // parseProof()
27332733

2734+
// Returns x * y + z, checking for (positive) overflow.
2735+
// Assumes x >= 0, y > 0, and z >= 0.
27342736
long saturatingMulAdd(long x, long y, long z) {
27352737
if (x > LONG_MAX / y) return LONG_MAX;
27362738
x *= y;
27372739
if (x > LONG_MAX - z) return LONG_MAX;
27382740
return x + z;
27392741
}
2742+
27402743
// Parse proof in compressed format.
27412744
// Parse proof of one statement in source file. Uses wrkProof structure.
27422745
// Returns 0 if OK; returns 1 if proof is incomplete (is empty or has '?'

0 commit comments

Comments
 (0)