groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 8/9] [indxbib]: Remove dead code


From: Alejandro Colomar
Subject: [PATCH v3 8/9] [indxbib]: Remove dead code
Date: Fri, 15 Mar 2024 15:24:42 +0100

The tests (LONG_MAX > INT_MAX && n > INT_MAX) and (n > INT_MAX) are
equivalent.

Fixes: d7b36a45fc3f ("[indxbib]: Mitigate Savannah #65452.")
Link: <https://savannah.gnu.org/bugs/?65452>
Link: <https://lists.gnu.org/archive/html/groff/2024-03/msg00065.html>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Dave Kemper <saint.snit@gmail.com>
Cc: "James K. Lowden" <jklowden@schemamania.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 src/utils/indxbib/indxbib.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/utils/indxbib/indxbib.cpp b/src/utils/indxbib/indxbib.cpp
index 6253e4782..68d5756e2 100644
--- a/src/utils/indxbib/indxbib.cpp
+++ b/src/utils/indxbib/indxbib.cpp
@@ -346,7 +346,7 @@ static void check_integer_arg(char opt, const char *arg, 
int min, int *res)
     fatal("argument to -%1 not an integer", opt);
   if (n < min)
     fatal("argument to -%1 must not be less than %2", opt, min);
-  if ((LONG_MAX > INT_MAX) && (n > INT_MAX))
+  if (n > INT_MAX)
     fatal("argument to -%1 must be between %2 and %3", arg, min, INT_MAX);
   if (*ptr != '\0')
     fatal("junk after integer argument to -%1", opt);
-- 
2.43.0

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]