Reallow 0 byte encodes

This commit is contained in:
Tushar Gohad 2015-03-11 08:54:12 -07:00
parent b6851e829d
commit d7d0bbde09
2 changed files with 0 additions and 10 deletions

View File

@ -392,12 +392,6 @@ int liberasurecode_encode(int desc,
goto out;
}
if (orig_data_size <= 0) {
log_error("Size of data to encode must be a positive value");
ret = -EINVALIDPARAMS;
goto out;
}
if (encoded_data == NULL) {
log_error("Pointer to encoded data buffers is null!");
return -EINVALIDPARAMS;

View File

@ -324,10 +324,6 @@ static void test_encode_invalid_args()
&encoded_data, &encoded_parity, &encoded_fragment_len);
assert(rc < 0);
rc = liberasurecode_encode(desc, orig_data, 0,
&encoded_data, &encoded_parity, &encoded_fragment_len);
assert(rc < 0);
rc = liberasurecode_encode(desc, orig_data, orig_data_size,
NULL, &encoded_parity, &encoded_fragment_len);
assert(rc < 0);