Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!moss@Brl-Vld.ARPA From: moss@Brl-Vld.ARPA (Gary S. Moss (AMXBR-VLD-V)) Newsgroups: net.unix Subject: Re: When does void make code less readable? Message-ID: <9041@brl-tgr.ARPA> Date: Thu, 7-Mar-85 12:14:32 EST Article-I.D.: brl-tgr.9041 Posted: Thu Mar 7 12:14:32 1985 Date-Received: Sun, 10-Mar-85 07:08:57 EST Sender: news@brl-tgr.ARPA Lines: 23 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 -&