1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

need parantheses around expression

This commit is contained in:
Ralph Metzler 2019-04-03 15:15:19 +02:00
parent 8cab284a65
commit ad0d1316a7

View File

@ -44,7 +44,7 @@ static u16 calc_pcs16(struct dvb_ns_params *p, int ipv)
u32 sum = 0, i; u32 sum = 0, i;
u16 pcs; u16 pcs;
for (i = 0; i < ipv ? 16 : 4; i += 2) { for (i = 0; i < (ipv ? 16 : 4); i += 2) {
sum += (p->sip[i] << 8) | p->sip[i + 1]; sum += (p->sip[i] << 8) | p->sip[i + 1];
sum += (p->dip[i] << 8) | p->dip[i + 1]; sum += (p->dip[i] << 8) | p->dip[i + 1];
} }