- tx_ol_flags = (uint16_t) (ports[port_id].tx_ol_flags & 0xFFF0);
- ports[port_id].tx_ol_flags = (uint16_t) ((cksum_mask & 0xf) | tx_ol_flags);
+ tx_ol_flags = ports[port_id].tx_ol_flags & (~0x0Full);
+ ports[port_id].tx_ol_flags = ((ol_flags & 0xf) | tx_ol_flags);