]> granicus.if.org Git - procps-ng/commit
free: remove redundant boundary check
authorSami Kerola <kerolasa@iki.fi>
Sun, 26 Feb 2012 11:26:59 +0000 (12:26 +0100)
committerCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2012 07:36:29 +0000 (18:36 +1100)
commita3544b00f8589c67eb8c41c4fbf3af97025235e6
tree8f1a23bc242800d5e71b863652be2dee551ad6cc
parent90c0590b4c236fe2b28633053ef86b7bf9ff0aa5
free: remove redundant boundary check

The strtol_or_err() already check argument is not larger than
LONG_MAX. This commit also removes clang warning.

free.c:262:55: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                        if (args.repeat_counter < 1 || args.repeat_counter > ULONG_MAX/2)
                                                       ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
free.c