Skip to content

Commit

Permalink
Do not need to reverse the list
Browse files Browse the repository at this point in the history
  • Loading branch information
ates committed Sep 6, 2012
1 parent f2244e5 commit 492a845
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pkt.erl
Expand Up @@ -360,8 +360,7 @@ sctp(<<SPort:16, DPort:16, VTag:32, Sum:32, Payload/binary>>) ->
sctp_decode_chunks(Chunks) ->
sctp_decode_chunks(Chunks, []).

sctp_decode_chunks(<<>>, Acc) ->
lists:reverse(Acc);
sctp_decode_chunks(<<>>, Acc) -> Acc;
sctp_decode_chunks(<<Type:8, Flags:8, Length:16, Rest/binary>>, Acc) ->
L = case Length rem 4 of
0 -> Length - 4;
Expand Down

0 comments on commit 492a845

Please sign in to comment.