aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/test/opt_verify_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hipe/test/opt_verify_SUITE.erl')
-rw-r--r--lib/hipe/test/opt_verify_SUITE.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hipe/test/opt_verify_SUITE.erl b/lib/hipe/test/opt_verify_SUITE.erl
index 86083fa02b..79bc2f1f73 100644
--- a/lib/hipe/test/opt_verify_SUITE.erl
+++ b/lib/hipe/test/opt_verify_SUITE.erl
@@ -59,7 +59,7 @@ call_elim_test_file(Config, FileName, Option) ->
substring_count(Icode, Substring) ->
substring_count(Icode, Substring, 0).
substring_count(Icode, Substring, N) ->
- case string:str(Icode, Substring) of
- 0 -> N;
- I -> substring_count(lists:nthtail(I, Icode), Substring, N+1)
+ case string:find(Icode, Substring) of
+ nomatch -> N;
+ Prefix -> substring_count(string:prefix(Prefix, Substring), Substring, N+1)
end.