[net.unix] When does void make code less readable?

moss@Brl-Vld.ARPA (Gary S. Moss (AMXBR-VLD-V)) (03/07/85)

How about keeping the error handling at the higher level AND freeing
that code from verboseness ...

char *
my_malloc( bytes, err )
unsigned	bytes;
void		(*err)();
	{
	extern char	*malloc();
	char		*ptr;

	if(	(ptr = malloc( bytes )) == NULL
	    &&	err != (void(*)()) NULL
		)
		{
		(*err)();
		}
	return	ptr;
	}

Now, I am not saying this needs to be in the 'C' library, you can't protect
people by giving them a false sense of security.
&- Moss -&