Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 8 additions and 22 deletions.
  1. +7 −21 c_src/bitcask_nifs.c
  2. +1 −1  src/bitcask.app.src
View
28 c_src/bitcask_nifs.c
@@ -1304,9 +1304,7 @@ ERL_NIF_TERM bitcask_nifs_file_open(ErlNifEnv* env, int argc, const ERL_NIF_TERM
}
else
{
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
else
@@ -1346,9 +1344,7 @@ ERL_NIF_TERM bitcask_nifs_file_sync(ErlNifEnv* env, int argc, const ERL_NIF_TERM
}
else
{
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
else
@@ -1404,9 +1400,7 @@ ERL_NIF_TERM bitcask_nifs_file_pread(ErlNifEnv* env, int argc, const ERL_NIF_TER
{
/* Read failed altogether */
enif_release_binary(&bin);
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
else
@@ -1442,9 +1436,7 @@ ERL_NIF_TERM bitcask_nifs_file_pwrite(ErlNifEnv* env, int argc, const ERL_NIF_TE
else
{
/* Write failed altogether */
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
@@ -1501,9 +1493,7 @@ ERL_NIF_TERM bitcask_nifs_file_read(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{
/* Read failed altogether */
enif_release_binary(&bin);
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
else
@@ -1534,9 +1524,7 @@ ERL_NIF_TERM bitcask_nifs_file_write(ErlNifEnv* env, int argc, const ERL_NIF_TER
else
{
/* Write failed altogether */
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
@@ -1562,9 +1550,7 @@ ERL_NIF_TERM bitcask_nifs_file_seekbof(ErlNifEnv* env, int argc, const ERL_NIF_T
else
{
/* Write failed altogether */
- ERL_NIF_TERM error = enif_make_tuple2(env, ATOM_ERROR,
- enif_make_atom(env, erl_errno_id(errno)));
- return enif_make_tuple2(env, ATOM_ERROR, error);
+ return enif_make_tuple2(env, ATOM_ERROR, errno_atom(env, errno));
}
}
else
View
2  src/bitcask.app.src
@@ -1,7 +1,7 @@
{application, bitcask,
[
{description, ""},
- {vsn, "1.5.0"},
+ {vsn, "1.5.1"},
{modules, []},
{registered, []},
{applications, [

No commit comments for this range

Something went wrong with that request. Please try again.