$NetBSD: patch-bd,v 1.1 2008/08/31 06:52:29 dholland Exp $ --- server/buf.c.orig 1998-04-09 17:44:21.000000000 -0400 +++ server/buf.c 2008-08-31 01:18:26.000000000 -0400 @@ -27,6 +27,8 @@ * Manage buffers. * * * ************************************************************************/ +#include +#include #include #include "xmx.h" @@ -65,8 +67,12 @@ buf_new chp = bp->head; } else { - if (MALLOC(bp, buffer_t *, sizeof(buffer_t))) - return (buffer_t *)err(0, "malloc returned zero"); + if (MALLOC(bp, buffer_t *, sizeof(buffer_t))) { + /* this err returns its first arg */ + /*return (buffer_t *)err(0, "malloc returned zero");*/ + err(0, "malloc returned zero"); + return NULL; + } if ((chp = new_chunk()) == 0) { free(bp); return 0;