esa@discuss.tchncs.de to Programming@programming.devEnglish · 4 months agoParse, Don’t Validate AKA Some C Safety Tipswww.lelanthran.comexternal-linkmessage-square14fedilinkarrow-up143arrow-down11cross-posted to: hackernews
arrow-up142arrow-down1external-linkParse, Don’t Validate AKA Some C Safety Tipswww.lelanthran.comesa@discuss.tchncs.de to Programming@programming.devEnglish · 4 months agomessage-square14fedilinkcross-posted to: hackernews
minus-squarebitcrafter@programming.devlinkfedilinkarrow-up1·3 months agoC supports passing structs around by value, so there was no need to allocate memory for it on the heap.
C supports passing
struct
s around by value, so there was no need to allocate memory for it on the heap.