From: Dmitry V. Levin Date: Sun, 16 Sep 2018 16:45:24 +0000 (+0000) Subject: tests/sprintrc.c: drop redundant check X-Git-Tag: v4.25~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f708bcfa45e64d7ddb3027721530fd71b35febc6;p=strace tests/sprintrc.c: drop redundant check * tests/sprintrc.c (sprintrc_ex): Remove fmt check, this also fixes the warning reported by clang -Wtautological-constant-out-of-range-compare. --- diff --git a/tests/sprintrc.c b/tests/sprintrc.c index 7423afb6..18f2572c 100644 --- a/tests/sprintrc.c +++ b/tests/sprintrc.c @@ -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";