File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -2822,8 +2822,8 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
2822
2822
}
2823
2823
2824
2824
if (!txn -> mt_parent ) {
2825
- if ( mdb_midl_shrink (& txn -> mt_free_pgs ))
2826
- env -> me_free_pgs = txn -> mt_free_pgs ;
2825
+ mdb_midl_shrink (& txn -> mt_free_pgs );
2826
+ env -> me_free_pgs = txn -> mt_free_pgs ;
2827
2827
/* me_pgstate: */
2828
2828
env -> me_pghead = NULL ;
2829
2829
env -> me_pglast = 0 ;
@@ -3409,8 +3409,8 @@ mdb_txn_commit(MDB_txn *txn)
3409
3409
3410
3410
mdb_midl_free (env -> me_pghead );
3411
3411
env -> me_pghead = NULL ;
3412
- if ( mdb_midl_shrink (& txn -> mt_free_pgs ))
3413
- env -> me_free_pgs = txn -> mt_free_pgs ;
3412
+ mdb_midl_shrink (& txn -> mt_free_pgs );
3413
+ env -> me_free_pgs = txn -> mt_free_pgs ;
3414
3414
3415
3415
#if (MDB_DEBUG ) > 2
3416
3416
mdb_audit (txn );
Original file line number Diff line number Diff line change @@ -116,17 +116,15 @@ void mdb_midl_free(MDB_IDL ids)
116
116
free (ids - 1 );
117
117
}
118
118
119
- int mdb_midl_shrink ( MDB_IDL * idp )
119
+ void mdb_midl_shrink ( MDB_IDL * idp )
120
120
{
121
121
MDB_IDL ids = * idp ;
122
122
if (* (-- ids ) > MDB_IDL_UM_MAX &&
123
123
(ids = realloc (ids , (MDB_IDL_UM_MAX + 1 ) * sizeof (MDB_ID ))))
124
124
{
125
125
* ids ++ = MDB_IDL_UM_MAX ;
126
126
* idp = ids ;
127
- return 1 ;
128
127
}
129
- return 0 ;
130
128
}
131
129
132
130
static int mdb_midl_grow ( MDB_IDL * idp , int num )
Original file line number Diff line number Diff line change @@ -98,9 +98,8 @@ void mdb_midl_free(MDB_IDL ids);
98
98
/** Shrink an IDL.
99
99
* Return the IDL to the default size if it has grown larger.
100
100
* @param[in,out] idp Address of the IDL to shrink.
101
- * @return 0 on no change, non-zero if shrunk.
102
101
*/
103
- int mdb_midl_shrink (MDB_IDL * idp );
102
+ void mdb_midl_shrink (MDB_IDL * idp );
104
103
105
104
/** Make room for num additional elements in an IDL.
106
105
* @param[in,out] idp Address of the IDL.
You can’t perform that action at this time.
0 commit comments