[erlang-patches] [PATCH 1/1] Documentation fix: ei_decode_ei_term() returns 1 if index is incremented
Wed Sep 7 01:31:23 CEST 2011
Included is a documentation fix and very minor clean-up for
ei_decode_ei_term(). Links follow, then the synopsis.
git fetch git://github.com/celtic/otp.git fix_erl_interface_docs
The function terminates with:
*index += s-s0;
We note that there is no other case of `return 1` in the function
(i.e. the function never returns `1` without incrementing `*index`).
There are a few cases of returning `0`, and in none of these cases is
`*index` incremented. There are a few cases like this, however:
term->arity = get8(s);
break; /*return 0;*/
Thus `1` will be ultimately returned, and the tuple header passed.
This is good behaviour, but the documentation needs to reflect it. The
commented returns could probably do with being removed.
More information about the erlang-patches