Closed Bug 1604399 Opened 2 years ago Closed 2 years ago

Dead assignment in Sgpd::Parse

Categories

(Core :: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: alexhenrie24, Assigned: alexhenrie24)

Details

Attachments

(1 file)

Sgpd::Parse currently has some code that looks like this:

const uint8_t version = flags >> 24;
flags = flags & 0xffffff;

Zeroing out the first 8 bits of the flags variable is pointless for two reasons: First, flags is never used except to get the version. Second, if we were to start using flags for something else in the future, the bitwise AND to check for any particular flag would zero out all irrelevant bits including the first 8.

Assignee: nobody → alexhenrie24
Status: NEW → ASSIGNED
Priority: -- → P2

nit: it doesn't zero out the first 8 bits, but the last 8.

Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a7d97d4f05a0
Remove dead assignment from Sgpd::Parse. r=jya
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.