Permalink
Browse files

lint

  • Loading branch information...
1 parent e52945b commit 8d7f7760b15ffa48a5113356803f620f3935c256 @mcandre committed Nov 15, 2013
Showing with 2 additions and 10 deletions.
  1. +1 −0 erlang/Makefile
  2. +1 −10 erlang/ios7crypt.erl
View
@@ -6,6 +6,7 @@ compile: ios7crypt.erl
test: compile
erl -noshell -s ios7crypt -extra -e monkey
erl -noshell -s ios7crypt -extra -d 020b0b55000316
+ erl -noshell -s ios7crypt -extra -t
~/.dialyzer_plt: compile
dialyzer *.beam --build_plt --quiet
View
@@ -52,16 +52,7 @@ decrypt(Hash) when length(Hash) < 4 -> {ok, ""};
decrypt(Hash) ->
FirstTwo = substr(Hash, 1, 2),
- FirstOneRaw = re:replace(FirstTwo, "^0", ""),
-
- FirstTemp = nthtail(1, FirstOneRaw),
-
- FirstOne = case is_binary(FirstTemp) of
- true -> binary_to_list(FirstTemp);
- false -> FirstOneRaw
- end,
-
- ToInt = (catch list_to_integer(FirstOne, 10)),
+ ToInt = (catch list_to_integer(FirstTwo, 10)),
case ToInt of
badarg ->

0 comments on commit 8d7f776

Please sign in to comment.