| I'm not sure I'm understanding this correctly... Given the examples, the author wants to ensure that 0 is not a possible input value, and NULL is not a possible output value. This could be achieved with a simple inline wrapper function that checks pre and post conditions and does abort() accordingly, without all of this extra ceremony But regardless of the mechansim you're left with another far more serious problem: You've now introduced `panic` to C. And panics are bad. Panics are landmines just waiting for some unfortunate circumstance to crash your app unexpectedly, which you can't control because control over error handling has now been wrested from you. It's why unwrap() in Rust is a terrible idea. It's why golang's bifurcated error mechanisms are a mess (and why, surprise surprise, the recommendation is to never use panic). |