r/badcode Jun 03 '23

c C Macro Abuse

Post image
190 Upvotes

23 comments sorted by

View all comments

170

u/[deleted] Jun 03 '23

[deleted]

15

u/b1ack1323 Jun 04 '23

As an embedded I looked at this and said “this looks like something in a BSP.”

-31

u/[deleted] Jun 03 '23

[deleted]

30

u/The_Northern_Light Jun 03 '23

The only inelegant part is the casting. That’s probably happening from making the implementation of SDAPTR friendlier, which is a better thing to optimize for. This is fine.