From facb37f1491c3ef54b0be6a5fb6e7fcef3acc7d4 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 28 Feb 2020 20:40:27 +0100 Subject: [PATCH] ToRationalEuclideanGCD: remove useless test that confuses Coverity Scan about a potential later modulo by zero --- libtiff/tif_dirwrite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c index 59e3bad5..97761106 100644 --- a/libtiff/tif_dirwrite.c +++ b/libtiff/tif_dirwrite.c @@ -2770,7 +2770,7 @@ void ToRationalEuclideanGCD(double value, int blnUseSignedRange, int blnUseSmall /* if bigDenom is not zero, calculate integer part of fraction. */ if (bigDenom == 0) { val = 0; - if (i > 0) break; /* if bigDenom is zero, exit loop, but execute loop just once */ + break; } else { val = bigNum / bigDenom;