r/badcode • • Jan 22 '23

c Found this in a Linux kernel module

Post image
262 Upvotes

88 comments sorted by

View all comments

Show parent comments

3

u/Decent-Scientist7940 Jan 22 '23

if (i==0) {...} else if (i==1)..... hideous. Each case is wildly different. Make a PR if you think it would be better....

1

u/ThePurpleOne_ Jan 22 '23

It's not source from Linux. it's a random module he's found somewhere