From: Christian Brauner Date: Sat, 20 Jan 2018 20:30:17 +0000 (+0100) Subject: coverity: #1427639 X-Git-Tag: lxc-3.0.0.beta1~66^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=358b8c818bea4df683c05647fa7b165037a29776;p=thirdparty%2Flxc.git coverity: #1427639 remove logically dead code Signed-off-by: Christian Brauner --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index a20e4b715..0b8841630 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -2415,12 +2415,8 @@ int parse_byte_size_string(const char *s, int64_t *converted) if (suffix_len > 0 && (end - 2) == dup && !isdigit(*(end - 2))) return -EINVAL; - if (suffix_len > 0 && isalpha(*(end - 2))) { - if (suffix_len == 1) - suffix_len++; - else - return -EINVAL; - } + if (suffix_len > 0 && isalpha(*(end - 2))) + suffix_len++; if (suffix_len > 0) { memcpy(suffix, end - suffix_len, suffix_len);