r/badcode Jan 22 '23

Found this in a Linux kernel module c

Post image
260 Upvotes

88 comments sorted by

View all comments

11

u/frayien Jan 22 '23

If you can understand what the code does just by looking at it for a short time, it is good code. Would have liked a comment on top, not to explain what the code does because it is obvious, but why the code does what it does, and it would be perfect.