diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-06-26 08:18:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-06-26 08:18:42 +0000 |
commit | 064cdb7ee69bff3af12d1e0b3c3b59207c594681 (patch) | |
tree | 9ed0ac9fe7b19110d739b20644f08b3e5d9e983b /source/lib/talloc.c | |
parent | 151b131ee01ef916c072bcdaa9943a2e984a0f45 (diff) | |
download | samba-064cdb7ee69bff3af12d1e0b3c3b59207c594681.tar.gz samba-064cdb7ee69bff3af12d1e0b3c3b59207c594681.tar.xz samba-064cdb7ee69bff3af12d1e0b3c3b59207c594681.zip |
fixed size alignment in talloc
Diffstat (limited to 'source/lib/talloc.c')
-rw-r--r-- | source/lib/talloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/talloc.c b/source/lib/talloc.c index 9ba793092d3..35d4ddd2110 100644 --- a/source/lib/talloc.c +++ b/source/lib/talloc.c @@ -56,11 +56,11 @@ void *talloc(TALLOC_CTX *t, size_t size) { void *p; - size = (size + TALLOC_ALIGN) & (~TALLOC_ALIGN-1); + size = (size + (TALLOC_ALIGN-1)) & ~(TALLOC_ALIGN-1); if (!t->list || (t->list->total_size - t->list->alloc_size) < size) { struct talloc_chunk *c; - size_t asize = (size + TALLOC_CHUNK_SIZE) & ~(TALLOC_CHUNK_SIZE-1); + size_t asize = (size + (TALLOC_CHUNK_SIZE-1)) & ~(TALLOC_CHUNK_SIZE-1); c = (struct talloc_chunk *)malloc(sizeof(*c)); if (!c) return NULL; |