]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
warnings: remove code that cannot be reached
authorSami Kerola <kerolasa@iki.fi>
Sun, 14 Aug 2016 20:21:45 +0000 (21:21 +0100)
committerSami Kerola <kerolasa@iki.fi>
Mon, 15 Aug 2016 20:56:14 +0000 (21:56 +0100)
Variable block_split gets value from static constants.  It is impossible to
reach the true if-case, so remote the test can the code block.

curses.c

index e7555fa1c033e7bd11162aed7f4f94e8998bc636..8782538f70ef52dd83f628c5de1d894b0d4a1889 100644 (file)
--- a/curses.c
+++ b/curses.c
@@ -518,9 +518,6 @@ void mtr_curses_init() {
 
        /* Initialize block_map. */
        block_split = (NUM_FACTORS - 2) / 2;
-       if (block_split > 9) {
-               block_split = 9;
-       }
        for (i = 1; i <= block_split; i++) {
                block_map[i] = '0' + i;
        }