blob: a325c04a5355acb741e4aa344d77463775d199fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$NetBSD: patch-bn,v 1.1 2008/08/31 06:52:29 dholland Exp $
--- server/cx.c.orig 1997-10-03 16:45:33.000000000 -0400
+++ server/cx.c 2008-08-31 01:27:59.000000000 -0400
@@ -30,6 +30,7 @@
* server i/o dialog. *
* *
************************************************************************/
+#include <stdlib.h>
#include "xmx.h"
#include "df.h"
#include "cx.h"
@@ -113,8 +114,12 @@ new_cx
cxp = cxfree;
cxfree = cxfree->next;
}
- else if (MALLOC(cxp, cx_t *, sizeof(cx_t)))
- return (cx_t *)err(0, "malloc returned zero");
+ else if (MALLOC(cxp, cx_t *, sizeof(cx_t))) {
+ /* this err returns its first argument */
+ /*return (cx_t *)err(0, "malloc returned zero");*/
+ err(0, "malloc returned zero");
+ return NULL;
+ }
return cxp;
}
|