changeset 1013:6bf2c4766d4c

* ralloc.c (get_bloc): When initializing new_bloc->variable, cast NIL to (POINTER *). (malloc_init): Give warning if sbrk returns zero. Wonder what that's supposed to mean.
author Jim Blandy <jimb@redhat.com>
date Wed, 19 Aug 1992 06:36:35 +0000
parents a48ed1d416dd
children 6e25f9b75841
files src/ralloc.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ralloc.c	Wed Aug 19 06:35:23 1992 +0000
+++ b/src/ralloc.c	Wed Aug 19 06:36:35 1992 +0000
@@ -225,7 +225,7 @@
   new_bloc->data = get_more_space (size);
   new_bloc->size = size;
   new_bloc->next = NIL_BLOC;
-  new_bloc->variable = NIL;
+  new_bloc->variable = (POINTER *) NIL;
 
   if (first_bloc)
     {
@@ -437,7 +437,11 @@
 
   malloc_initialized = 1;
   __morecore = r_alloc_sbrk;
+
   virtual_break_value = break_value = sbrk (0);
+  if (break_value == (POINTER)NULL)
+    (*warn_func)("Malloc initialization returned 0 from sbrk(0).");
+
   page_break_value = (POINTER) ROUNDUP (break_value);
   bzero (break_value, (page_break_value - break_value));
   use_relocatable_buffers = 1;