I messed up some minor style/indentation, ignore all calls to cursor->close
(that's not correct, but it will do for now).
This commit is contained in:
parent
7e6d947765
commit
3323cf5844
1 changed files with 8 additions and 8 deletions
|
@ -186,28 +186,28 @@ static inline ERL_NIF_TERM wterl_session_worker(ErlNifEnv* env, int argc, const
|
||||||
int rc;
|
int rc;
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case WTERL_OP_CREATE:
|
case WTERL_OP_CREATE:
|
||||||
rc = session->create(session, uri, (const char*)config.data);
|
rc = session->create(session, uri, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
case WTERL_OP_DROP:
|
case WTERL_OP_DROP:
|
||||||
rc = session->drop(session, uri, (const char*)config.data);
|
rc = session->drop(session, uri, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
case WTERL_OP_SALVAGE:
|
case WTERL_OP_SALVAGE:
|
||||||
rc = session->salvage(session, uri, (const char*)config.data);
|
rc = session->salvage(session, uri, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
case WTERL_OP_SYNC:
|
case WTERL_OP_SYNC:
|
||||||
rc = session->sync(session, uri, (const char*)config.data);
|
rc = session->sync(session, uri, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
case WTERL_OP_TRUNCATE:
|
case WTERL_OP_TRUNCATE:
|
||||||
// Ignore the cursor start/stop form of truncation for now,
|
// Ignore the cursor start/stop form of truncation for now,
|
||||||
// support only the full file truncation.
|
// support only the full file truncation.
|
||||||
rc = session->truncate(session, uri, NULL, NULL, (const char*)config.data);
|
rc = session->truncate(session, uri, NULL, NULL, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
case WTERL_OP_UPGRADE:
|
case WTERL_OP_UPGRADE:
|
||||||
rc = session->upgrade(session, uri, (const char*)config.data);
|
rc = session->upgrade(session, uri, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case WTERL_OP_VERIFY:
|
case WTERL_OP_VERIFY:
|
||||||
rc = session->verify(session, uri, (const char*)config.data);
|
rc = session->verify(session, uri, (const char*)config.data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
|
@ -351,7 +351,7 @@ static ERL_NIF_TERM wterl_session_delete(ErlNifEnv* env, int argc, const ERL_NIF
|
||||||
raw_key.size = key.size;
|
raw_key.size = key.size;
|
||||||
cursor->set_key(cursor, &raw_key);
|
cursor->set_key(cursor, &raw_key);
|
||||||
rc = cursor->remove(cursor);
|
rc = cursor->remove(cursor);
|
||||||
cursor->close(cursor);
|
(void)cursor->close(cursor);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
{
|
{
|
||||||
return wterl_strerror(env, rc);
|
return wterl_strerror(env, rc);
|
||||||
|
|
Loading…
Reference in a new issue