-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix coding style in rtp module. #1083
Conversation
cc69f9b
to
32cbfc7
Compare
* Named callback types only. * No anonymous enums or structs. * `++i` instead of `i++`. * Don't use enums to specify integer constants. Enums should be enumerations. All values of an enum type should be listed[1]. [1] I don't know what to do about bit masks yet, but given that enums by C standard can only go up to 32767 portably and 2^31 in reality, they are probably not useful for 64 bit bit masks.
@@ -586,12 +583,14 @@ static int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t | |||
size_t rtp_header_pack(uint8_t *const rdata, const struct RTPHeader *header) | |||
{ | |||
uint8_t *p = rdata; | |||
*p++ = (header->ve & 3) << 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zoink
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! 1 of 1 approvals obtained
++i
instead ofi++
.enumerations. All values of an enum type should be listed[1].
[1] I don't know what to do about bit masks yet, but given that enums by
C standard can only go up to 32767 portably and 2^31 in reality, they are
probably not useful for 64 bit bit masks.
This change is