New review comment by alejandro-colomar on void-packages repository https://github.com/void-linux/void-packages/pull/48813#discussion_r1518570037 Comment: These xfoo() functions are designed to exit/abort on errors reported by the corresponding foo() function. Thus, xstrdup() is strdup(3) plus a check of an output NULL from strdup(3) to error out. The precise reason to have these functions is so that they can *never* return NULL. Adding null checks to a NULL input is tangential to the purpose of these functions, and defeats their purpose. Now the function can return NULL, which needs to be checked by the caller. So, if you really want to check for programmer errors, you'd need to exit on a NULL input, not just pass it through. But you probably shouldn't do that at all. strdup(3) doesn't handle NULL input, and I don't see a reason why xstrdup() should.