Whitespace and comment cleanup.
This commit is contained in:
parent
acbcf9d601
commit
f4eea4a594
2 changed files with 7 additions and 8 deletions
|
@ -171,13 +171,12 @@ decode_crc_data(<<>>, BrokenData, Acc) ->
|
||||||
%% simply returning "the good parts".
|
%% simply returning "the good parts".
|
||||||
%%
|
%%
|
||||||
%% {error, data_corruption};
|
%% {error, data_corruption};
|
||||||
|
|
||||||
decode_crc_data(<< BinSize:32/unsigned, CRC:32/unsigned, Bin:BinSize/binary, ?TAG_END, Rest/binary >>, Broken, Acc) ->
|
decode_crc_data(<< BinSize:32/unsigned, CRC:32/unsigned, Bin:BinSize/binary, ?TAG_END, Rest/binary >>, Broken, Acc) ->
|
||||||
CRCTest = erlang:crc32( Bin ),
|
CRCTest = erlang:crc32( Bin ),
|
||||||
if CRC == CRCTest ->
|
if CRC == CRCTest ->
|
||||||
decode_crc_data(Rest, Broken, [ decode_kv_data( Bin ) | Acc ]);
|
decode_crc_data(Rest, Broken, [ decode_kv_data( Bin ) | Acc ]);
|
||||||
true ->
|
true ->
|
||||||
%% chunk is broken, ignore it. Maybe we should tell someone?
|
%% TODO: chunk is broken, ignore it. Maybe we should tell someone?
|
||||||
decode_crc_data(Rest, [Bin|Broken], Acc)
|
decode_crc_data(Rest, [Bin|Broken], Acc)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue