# HG changeset patch # User Richard M. Stallman # Date 1085847027 0 # Node ID a05a653f63afbc3c7846617552ec6c1e08391820 # Parent 41c33773289ff8e51b90f039f7d6dbb537805790 (lisp_align_malloc): Check for base == 0 regardless of HAVE_POSIX_MEMALIGN. Clean up HAVE_POSIX_MEMALIGN handling of `err'. diff -r 41c33773289f -r a05a653f63af src/alloc.c --- 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)