summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-02-17 16:24:32 +0000
committerRobin Watts <Robin.Watts@artifex.com>2022-02-17 16:24:32 +0000
commit7e36b200197732eede4cfcd0331c49d27adb4978 (patch)
tree3e55c6f08407b019f7c0ad5a363ed8fe93744f60
parent513bc4bbcb83e10a746696d351e070161689d7ac (diff)
downloadghostpdl-7e36b200197732eede4cfcd0331c49d27adb4978.tar.gz
Coverity 375707: Logically dead code.
Coverity correctly spotted that the doubleneg case is dealt with earlier.
-rw-r--r--pdf/pdf_int.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pdf/pdf_int.c b/pdf/pdf_int.c
index 1d0ca6760..a23144d68 100644
--- a/pdf/pdf_int.c
+++ b/pdf/pdf_int.c
@@ -306,7 +306,8 @@ static int pdfi_read_num(pdf_context *ctx, pdf_c_stream *s, uint32_t indirect_nu
} else if (real) {
num->value.d = acrobat_compatible_atof((char *)Buffer);
} else {
- num->value.i = doubleneg ? 0 : negative ? -int_val : int_val;
+ /* The doubleneg case is taken care of above. */
+ num->value.i = negative ? -int_val : int_val;
}
if (ctx->args.pdfdebug) {
if (real)