coverity: #1427639

remove logically dead code Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 4d078b3c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment