malloc has a "binary" return status anyway; if it's not null, you win, if it is null, you lose.
Wrapping this up (however badly) into a function does no good.
Consider
Code:
char *p;
p = malloc( 10 );
strcpy( p, "hello" );
vs.
Code:
char *p;
alloc(&p, 10);
strcpy( p, "hello" );
The problem isn't the wrapper, the problem is the programmer NOT checking for errors when they should.
However, the former is at least predictable in that p will always be initialised regardless. So that if malloc does fail, at least you get a nice fat segfault for your trouble.
But case 2? Gee, that seems to leave the pointer UNINITIALISED!
I bet that's a barrel of fun trying to debug that fella.
Or is this an artefact of your "compact for brevity"?
This gets past the dodgy pointer assignment semantics, but still doesn't prevent sloppy coders from ignoring the return result. But at least they always get a valid pointer (or NULL).
Code:
void *alloc(bool *status, size_t z)
{
void *r = malloc(z);
*status = true;
if (r == NULL) *status = false;
return r;
}