changeset 55836:a05a653f63af

(lisp_align_malloc): Check for base == 0 regardless of HAVE_POSIX_MEMALIGN. Clean up HAVE_POSIX_MEMALIGN handling of `err'.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 May 2004 16:10:27 +0000
parents 41c33773289f
children 16da17b0941a
files src/alloc.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Sat May 29 15:54:40 2004 +0000
+++ b/src/alloc.c	Sat May 29 16:10:27 2004 +0000
@@ -754,17 +754,20 @@
 #ifdef HAVE_POSIX_MEMALIGN
       {
 	int err = posix_memalign (&base, BLOCK_ALIGN, ABLOCKS_BYTES);
-	abase = err ? (base = NULL) : base;
+	if (err)
+	  base = NULL;
+	abase = base;
       }
 #else
       base = malloc (ABLOCKS_BYTES);
       abase = ALIGN (base, BLOCK_ALIGN);
+#endif
+
       if (base == 0)
 	{
 	  UNBLOCK_INPUT;
 	  memory_full ();
 	}
-#endif
 
       aligned = (base == abase);
       if (!aligned)