File tree 1 file changed +16
-1
lines changed 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.22 2001/06/01 19:54:58 tgl Exp $
12
+ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.23 2001/06/02 15:16:55 wieck Exp $
13
13
*
14
14
*-------------------------------------------------------------------------
15
15
*/
16
16
17
17
/* can be used in frontend or backend */
18
18
#ifdef FRONTEND
19
19
#include "postgres_fe.h"
20
+ #include <sysexits.h>
20
21
/* No assert checks in frontend ... */
21
22
#define Assert (condition )
22
23
#else
@@ -33,7 +34,14 @@ DLNewList(void)
33
34
34
35
l = (Dllist * ) malloc (sizeof (Dllist ));
35
36
if (l == NULL )
37
+ #ifdef FRONTEND
38
+ {
39
+ fprintf (stderr , "Memory exhausted in DLNewList" );
40
+ exit (EX_UNAVAILABLE );
41
+ }
42
+ #else
36
43
elog (ERROR , "Memory exhausted in DLNewList" );
44
+ #endif
37
45
l -> dll_head = 0 ;
38
46
l -> dll_tail = 0 ;
39
47
@@ -69,7 +77,14 @@ DLNewElem(void *val)
69
77
70
78
e = (Dlelem * ) malloc (sizeof (Dlelem ));
71
79
if (e == NULL )
80
+ #ifdef FRONTEND
81
+ {
82
+ fprintf (stderr , "Memory exhausted in DLNewList" );
83
+ exit (EX_UNAVAILABLE );
84
+ }
85
+ #else
72
86
elog (ERROR , "Memory exhausted in DLNewElem" );
87
+ #endif
73
88
e -> dle_next = 0 ;
74
89
e -> dle_prev = 0 ;
75
90
e -> dle_val = val ;
You can’t perform that action at this time.
0 commit comments