summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-27 12:43:50 -0700
committerJeremy Allison <jra@samba.org>2013-08-27 15:44:19 -0700
commit7a6beae68ee3f9a97e9e56f4e24a437839fb3e19 (patch)
tree0d70aa3098c98cb3d9dd099e43ef5ace5a9c0f05 /lib
parentfe790f6cbc9b888a8d613cfb515f0d0c76daad47 (diff)
downloadsamba-7a6beae68ee3f9a97e9e56f4e24a437839fb3e19.tar.gz
samba-7a6beae68ee3f9a97e9e56f4e24a437839fb3e19.tar.bz2
samba-7a6beae68ee3f9a97e9e56f4e24a437839fb3e19.zip
Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().
Callers already account for TC_HDR_SIZE, do not add it twice. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/talloc/talloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 067d46f97d..7b827ca0c1 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -2561,7 +2561,7 @@ static bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size)
for (l = limit; l != NULL; l = l->upper) {
if (l->max_size != 0 &&
((l->max_size <= l->cur_size) ||
- (l->max_size - l->cur_size < TC_HDR_SIZE+size))) {
+ (l->max_size - l->cur_size < size))) {
return false;
}
}