aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-07-05 17:26:43 +0200
committerLukas Larsson <[email protected]>2011-08-01 16:38:20 +0200
commit802ac96adf90d4f8868f1a0b49cb912d4796efb8 (patch)
treea623aaa4c42f13cffe09184b12d2e700d626fd97 /lib
parent7aa1f823956480d3e5f03ca1a7e14f5a48c041dd (diff)
downloadotp-802ac96adf90d4f8868f1a0b49cb912d4796efb8.tar.gz
otp-802ac96adf90d4f8868f1a0b49cb912d4796efb8.tar.bz2
otp-802ac96adf90d4f8868f1a0b49cb912d4796efb8.zip
return 0 as error code when an unknown error happens
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/c_src/asn1_erl_nif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c
index 41ce504273..e9f67636cc 100644
--- a/lib/asn1/c_src/asn1_erl_nif.c
+++ b/lib/asn1/c_src/asn1_erl_nif.c
@@ -1021,6 +1021,8 @@ static ERL_NIF_TERM encode_per_complete(ErlNifEnv* env, int argc,
if (complete_len == ASN1_ERROR
)
err_code = enif_make_uint(env, '1');
+ else
+ err_code = enif_make_uint(env, 0);
return enif_make_tuple2(env, enif_make_atom(env, "error"), err_code);
}
if (complete_len < out_binary.size)