Commit ac2eda5c authored by Martin Jackson's avatar Martin Jackson Committed by Jean-Paul Saman

Remove unneeded byte overflow checks.

In addition, my compiler complains about some non-sensical byte
overflow checks, which break my build (with -Werror enabled):
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent acf63248
......@@ -61,8 +61,7 @@ dvbpsi_network_name_dr_t* dvbpsi_DecodeNetworkNameDr(
return NULL;
/* Decode data */
p_decoded->i_name_length = p_descriptor->i_length <= 255 ?
p_descriptor->i_length : 255;
p_decoded->i_name_length = p_descriptor->i_length;
if (p_decoded->i_name_length)
memcpy(p_decoded->i_name_byte,
p_descriptor->p_data,
......
......@@ -58,9 +58,6 @@ dvbpsi_default_authority_dr_t *dvbpsi_DecodeDefaultAuthorityDr(dvbpsi_descriptor
if (!p_decoded)
return NULL;
if (p_descriptor->i_length > 255)
p_descriptor->i_length = 255;
memcpy(&p_decoded->authority, p_descriptor->p_data, p_descriptor->i_length);
p_decoded->authority[p_descriptor->i_length] = 0;
......
......@@ -216,7 +216,6 @@ void dvbpsi_decoder_reset(dvbpsi_decoder_t* p_decoder, const bool b_force)
bool dvbpsi_decoder_psi_sections_completed(dvbpsi_decoder_t* p_decoder)
{
assert(p_decoder);
assert(p_decoder->i_last_section_number <= 255);
bool b_complete = false;
......
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