diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-03-08 14:15:18 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-03-08 14:15:18 -0500 |
commit | 5daa765bd1152aeaa97e68f68bc639c0eac4b01e (patch) | |
tree | 4a126eeb2efb53a8febdfd832f87e8a47b24ff1c | |
parent | 57ed8fbbdd6cdbca240f458fca391ba6363c7797 (diff) | |
parent | fe50b676bc905c527254d0bbd1f7c36d41512efe (diff) | |
download | tor-5daa765bd1152aeaa97e68f68bc639c0eac4b01e.tar.gz tor-5daa765bd1152aeaa97e68f68bc639c0eac4b01e.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
-rw-r--r-- | changes/bug5340 | 3 | ||||
-rw-r--r-- | src/common/OpenBSD_malloc_Linux.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changes/bug5340 b/changes/bug5340 new file mode 100644 index 0000000000..708988af08 --- /dev/null +++ b/changes/bug5340 @@ -0,0 +1,3 @@ + o Minor bugfixes: + - Fix a compile warning when using the --enable-openbsd-malloc configure + option. Fixes bug 5340; bugfix on 0.2.0.20-rc. diff --git a/src/common/OpenBSD_malloc_Linux.c b/src/common/OpenBSD_malloc_Linux.c index 445135c6bb..92ca9c0066 100644 --- a/src/common/OpenBSD_malloc_Linux.c +++ b/src/common/OpenBSD_malloc_Linux.c @@ -285,6 +285,8 @@ static void *imalloc(size_t size); static void ifree(void *ptr); static void *irealloc(void *ptr, size_t size); static void *malloc_bytes(size_t size); +void *memalign(size_t boundary, size_t size); +size_t malloc_good_size(size_t size); /* * Function for page directory lookup. @@ -1980,10 +1982,11 @@ static int ispowerof2 (size_t a) { int posix_memalign(void **memptr, size_t alignment, size_t size) { void *r; + size_t max; if ((alignment < PTR_SIZE) || (alignment%PTR_SIZE != 0)) return EINVAL; if (!ispowerof2(alignment)) return EINVAL; if (alignment < malloc_minsize) alignment = malloc_minsize; - size_t max = alignment > size ? alignment : size; + max = alignment > size ? alignment : size; if (alignment <= malloc_pagesize) r = malloc(max); else { |