From: Hallvard Furuseth Date: Fri, 30 May 2014 07:06:08 +0000 (+0200) Subject: Simplify MDB_MULTIPLE X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~132^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ba8f59edf42ff700bebf65e7e30e3d1f0101b326;p=openldap Simplify MDB_MULTIPLE --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index c4eaa262a0..3653f48562 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5976,12 +5976,9 @@ more: /* if data matches, skip it */ if (!mc->mc_dbx->md_dcmp(data, &olddata)) { if (flags & MDB_NODUPDATA) - rc = MDB_KEYEXIST; - else if (flags & MDB_MULTIPLE) - goto next_mult; - else - rc = MDB_SUCCESS; - return rc; + return MDB_KEYEXIST; + rc = MDB_SUCCESS; + goto next_sub; } /* Back up original data item */ @@ -6258,9 +6255,9 @@ put_sub: */ mc->mc_flags |= C_INITIALIZED; } +next_sub: if (flags & MDB_MULTIPLE) { if (!rc) { -next_mult: mcount++; /* let caller know how many succeeded, if any */ data[1].mv_size = mcount;