Whitespace and comment cleanup.

This commit is contained in:
Gregory Burd 2012-06-11 23:40:07 +01:00
parent acbcf9d601
commit f4eea4a594
2 changed files with 7 additions and 8 deletions

View file

@ -171,13 +171,12 @@ decode_crc_data(<<>>, BrokenData, Acc) ->
%% simply returning "the good parts".
%%
%% {error, data_corruption};
decode_crc_data(<< BinSize:32/unsigned, CRC:32/unsigned, Bin:BinSize/binary, ?TAG_END, Rest/binary >>, Broken, Acc) ->
CRCTest = erlang:crc32( Bin ),
if CRC == CRCTest ->
decode_crc_data(Rest, Broken, [ decode_kv_data( Bin ) | Acc ]);
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)
end;