summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/lmdb/midl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdb/src/lmdb/midl.c')
-rw-r--r--plugins/Dbx_mdb/src/lmdb/midl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/Dbx_mdb/src/lmdb/midl.c b/plugins/Dbx_mdb/src/lmdb/midl.c
index 88a3aff10c..5c6d841a7a 100644
--- a/plugins/Dbx_mdb/src/lmdb/midl.c
+++ b/plugins/Dbx_mdb/src/lmdb/midl.c
@@ -3,7 +3,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2014 The OpenLDAP Foundation.
+ * Copyright 2000-2015 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -116,17 +116,15 @@ void mdb_midl_free(MDB_IDL ids)
free(ids-1);
}
-int mdb_midl_shrink( MDB_IDL *idp )
+void mdb_midl_shrink( MDB_IDL *idp )
{
MDB_IDL ids = *idp;
if (*(--ids) > MDB_IDL_UM_MAX &&
- (ids = realloc(ids, (MDB_IDL_UM_MAX+1) * sizeof(MDB_ID))))
+ (ids = realloc(ids, (MDB_IDL_UM_MAX+2) * sizeof(MDB_ID))))
{
*ids++ = MDB_IDL_UM_MAX;
*idp = ids;
- return 1;
}
- return 0;
}
static int mdb_midl_grow( MDB_IDL *idp, int num )