Toke Høiland-Jørgensen <[email protected]> writes: >>Lastly, if anyone has time to review even just a little code for what >>is or is not good or idiomatic C, post an issue and I’d appreciate it. >>Yes, I yield to the ‘goto’ proponents when it comes to error handling >>and resource de-allocation. :) > > I'll take a look tomorrow :)
I can tell from the code that you're coming from Go. But the only thing I found strange on a cursory glance was your error handling method of returning a pointer that is NULL on success. I know this corresponds to "return 0 on success", but, well I was thrown off by the "return NULL" statements in functions indicating success. The usual pattern is to return the error code, and pass in a pointer to the error struct that is only filled if the return code is != 0. This is very much a matter of taste, though, and if you prefer your current style just keep it :) -Toke _______________________________________________ Cake mailing list [email protected] https://lists.bufferbloat.net/listinfo/cake
