On Wed, 25 Jul 2012, Samuel Pitoiset wrote:

This check is used to make things more consistent because we already
do this test for client bandwidth packets.

No, this is not a good commit message.

The commit message does not need to include every tiny irrelevant detail of the actual change. To me as a reader of the change, why do I need to know that 4 is the exact number of bytes?

This time I will not tell you the direct answer by giving a direct suggestion. You will need to be able to explain your code and write sensible commit messages yourself, so now is a great opportunity to practice.

Your reasoning for the change is also very wrong. We do not add buffer size checks to be consistent. We add buffer size checks because if there's not enough data, you can read outside of an allocate buffer and crash. Making things consistent is only an argument if you already have a check but it's written differently at different places.

// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to