HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5de706b
)
(lisp_align_malloc): Check for base == 0 regardless of HAVE_POSIX_MEMALIGN.
author
Richard M. Stallman
<rms@gnu.org>
Sat, 29 May 2004 16:10:27 +0000
(16:10 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sat, 29 May 2004 16:10:27 +0000
(16:10 +0000)
Clean up HAVE_POSIX_MEMALIGN handling of `err'.
src/alloc.c
patch
|
blob
|
blame
|
history
diff --git
a/src/alloc.c
b/src/alloc.c
index
0a0b25b
..
055f5d8
100644
(file)
--- a/
src/alloc.c
+++ b/
src/alloc.c
@@
-754,17
+754,20
@@
lisp_align_malloc (nbytes, type)
#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)