From 6121a75e201ed9c4296838bdfae424972be44f40 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 24 Jan 2018 13:01:42 +0300 Subject: if we don't use MDBX_DUPSORT, there's no need to pass the data parameter --- plugins/Dbx_mdbx/src/dbcontacts.cpp | 4 ++-- plugins/Dbx_mdbx/src/dbevents.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Dbx_mdbx') diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index b0eb5ca2ee..72a88492d1 100644 --- a/plugins/Dbx_mdbx/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -168,8 +168,8 @@ BOOL CDbxMDBX::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) { txn_ptr trnlck(m_env); DBEventSortingKey insVal = { ccMeta->contactID, EI->eventId, EI->ts }; - MDBX_val key = { &insVal, sizeof(insVal) }, data = { (void*)"", 1 }; - if (mdbx_del(trnlck, m_dbEventsSort, &key, &data) != MDBX_SUCCESS) + MDBX_val key = { &insVal, sizeof(insVal) }; + if (mdbx_del(trnlck, m_dbEventsSort, &key, nullptr) != MDBX_SUCCESS) return 1; if (trnlck.commit() != MDBX_SUCCESS) return 1; diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 59a93cf494..71a9a44353 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -148,7 +148,7 @@ STDMETHODIMP_(BOOL) CDbxMDBX::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) DBEventSortingKey key2 = { contactID, hDbEvent, dbe.timestamp }; MDBX_val key = { &key2, sizeof(key2) }, data; - if (mdbx_del(txn, m_dbEventsSort, &key, &data) != MDBX_SUCCESS) + if (mdbx_del(txn, m_dbEventsSort, &key, nullptr) != MDBX_SUCCESS) return 1; { @@ -164,7 +164,7 @@ STDMETHODIMP_(BOOL) CDbxMDBX::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) if (cc2) { key2.hContact = dbe.contactID; - if (mdbx_del(txn, m_dbEventsSort, &key, &data) != MDBX_SUCCESS) + if (mdbx_del(txn, m_dbEventsSort, &key, nullptr) != MDBX_SUCCESS) return 1; key.iov_len = sizeof(MCONTACT); key.iov_base = &contactID; @@ -179,7 +179,7 @@ STDMETHODIMP_(BOOL) CDbxMDBX::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) // remove a event key.iov_len = sizeof(MEVENT); key.iov_base = &hDbEvent; - if (mdbx_del(txn, m_dbEvents, &key, &data) != MDBX_SUCCESS) + if (mdbx_del(txn, m_dbEvents, &key, nullptr) != MDBX_SUCCESS) return 1; if (txn.commit() != MDBX_SUCCESS) -- cgit v1.2.3