]> code.delx.au - gnu-emacs/commitdiff
* ralloc.c (get_bloc): When initializing new_bloc->variable, cast
authorJim Blandy <jimb@redhat.com>
Wed, 19 Aug 1992 06:36:35 +0000 (06:36 +0000)
committerJim Blandy <jimb@redhat.com>
Wed, 19 Aug 1992 06:36:35 +0000 (06:36 +0000)
NIL to (POINTER *).
(malloc_init): Give warning if sbrk returns zero.  Wonder what
that's supposed to mean.

src/ralloc.c

index aceac44b938b9a6520c35162d278554810dfa772..d06472f8ea90f77557c05cdf30de379d9252cccc 100644 (file)
@@ -225,7 +225,7 @@ get_bloc (size)
   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_init (start, warn_func)
 
   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;