]> granicus.if.org Git - strace/commitdiff
tests/sprintrc.c: drop redundant check
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 16 Sep 2018 16:45:24 +0000 (16:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 16 Sep 2018 16:45:24 +0000 (16:45 +0000)
* tests/sprintrc.c (sprintrc_ex): Remove fmt check, this also fixes the
warning reported by clang -Wtautological-constant-out-of-range-compare.

tests/sprintrc.c

index 7423afb694b1a07871109023d309a711130aff3c..18f2572c40eb82f915be4463e895691f063e08dd 100644 (file)
@@ -54,9 +54,6 @@ sprintrc_ex(long rc, enum sprintrc_fmt fmt)
        };
        static char buf[4096];
 
-       if (fmt >= ARRAY_SIZE(formats))
-               perror_msg_and_fail("sprintrc_ex: incorrect format provided");
-
        if (rc == 0)
                return "0";