Fix variable 'Bytes' exported from 'case' #1

Merged
merged 1 commit into from Jun 24, 2012
Jump to file or symbol
Failed to load files and symbols.
+6 −6
Split
View
@@ -77,12 +77,12 @@ cmprint(Bin1, Bin2) when is_binary(Bin1) orelse is_bitstring(Bin1),
-spec from_str(string(), hex) -> binary().
from_str(Str, hex) when is_list(Str) ->
- case lists:member($ , Str) of
- true ->
- Bytes = string:tokens(Str, " ");
- false when length(Str) rem 2 =:= 0 ->
- Bytes = buckets(2, Str)
- end,
+ Bytes = case lists:member($ , Str) of
+ true ->
+ string:tokens(Str, " ");
+ false when length(Str) rem 2 =:= 0 ->
+ buckets(2, Str)
+ end,
list_to_binary([ list_to_integer(B,16) || B <- Bytes]).
-spec from_str(string()) -> binary().