From ba0d0533bf8aab7938796ddca3987fc5ed776cb7 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 14 Dec 2016 16:11:36 +0100 Subject: Fix another one typo Signed-off-by: Peter Lemenkov --- c_src/sd_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/sd_notify.c b/c_src/sd_notify.c index 9edf737..19425b2 100644 --- a/c_src/sd_notify.c +++ b/c_src/sd_notify.c @@ -45,7 +45,7 @@ static ERL_NIF_TERM sd_pid_notify_with_fds_nif(ErlNifEnv* env, int argc, const E enif_get_string(env, argv[2], state, length, ERL_NIF_LATIN1); enif_get_list_length(env, argv[3], &length); - int* fds = (int*)enif_alloc(++length * sizeof(int)); + int* fds = (int*)enif_alloc(length * sizeof(int)); ERL_NIF_TERM list = argv[3]; int i = 0; while(enif_get_list_cell(env, list, &head, &tail)) { -- cgit v1.2.1