diff options
| author | Paul Eggert | 2013-11-08 08:24:40 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-11-08 08:24:40 -0800 |
| commit | 220a304ac3e1948e40ea76a82bc62bd81c2a6906 (patch) | |
| tree | 258d6b1b3b7ef513a7e040faf7b3d687b1d93d03 /src/gmalloc.c | |
| parent | 71731c03382ba72c08d8a8d15ee074b4d3c97e66 (diff) | |
| download | emacs-220a304ac3e1948e40ea76a82bc62bd81c2a6906.tar.gz emacs-220a304ac3e1948e40ea76a82bc62bd81c2a6906.zip | |
Merge from gnulib.
This incorporates:
2013-11-08 extern-inline: port better to OS X 10.9
2013-11-08 fpending: fix regression on DragonFly BSD
* lib/fpending.h, m4/extern-inline.m4, m4/fpending.m4:
Update from gnulib.
Diffstat (limited to 'src/gmalloc.c')
| -rw-r--r-- | src/gmalloc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c index fc728eeea7e..c50df25cd41 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -1307,8 +1307,8 @@ special_realloc (void *ptr, size_t size) | |||
| 1307 | type == 0 ? bss_sbrk_heapinfo[block].busy.info.size * BLOCKSIZE | 1307 | type == 0 ? bss_sbrk_heapinfo[block].busy.info.size * BLOCKSIZE |
| 1308 | : (size_t) 1 << type; | 1308 | : (size_t) 1 << type; |
| 1309 | result = _malloc_internal_nolock (size); | 1309 | result = _malloc_internal_nolock (size); |
| 1310 | if (result != NULL) | 1310 | if (result) |
| 1311 | memcpy (result, ptr, min (oldsize, size)); | 1311 | return memcpy (result, ptr, min (oldsize, size)); |
| 1312 | return result; | 1312 | return result; |
| 1313 | } | 1313 | } |
| 1314 | #endif | 1314 | #endif |
| @@ -1501,7 +1501,7 @@ calloc (size_t nmemb, size_t size) | |||
| 1501 | 1501 | ||
| 1502 | result = malloc (bytes); | 1502 | result = malloc (bytes); |
| 1503 | if (result) | 1503 | if (result) |
| 1504 | memset (result, 0, bytes); | 1504 | return memset (result, 0, bytes); |
| 1505 | return result; | 1505 | return result; |
| 1506 | } | 1506 | } |
| 1507 | /* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | 1507 | /* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
| @@ -1814,8 +1814,7 @@ mallochook (size_t size) | |||
| 1814 | hdr->size = size; | 1814 | hdr->size = size; |
| 1815 | hdr->magic = MAGICWORD; | 1815 | hdr->magic = MAGICWORD; |
| 1816 | ((char *) &hdr[1])[size] = MAGICBYTE; | 1816 | ((char *) &hdr[1])[size] = MAGICBYTE; |
| 1817 | memset (hdr + 1, MALLOCFLOOD, size); | 1817 | return memset (hdr + 1, MALLOCFLOOD, size); |
| 1818 | return hdr + 1; | ||
| 1819 | } | 1818 | } |
| 1820 | 1819 | ||
| 1821 | static void * | 1820 | static void * |