Browse Source

Fix `-if(?OTP_RELEASE)` (was missing question mark)

Sergey Prokhorov 4 years ago
parent
commit
af4646317f
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/epgsql_scram.erl

+ 7 - 7
src/epgsql_scram.erl

@@ -117,13 +117,13 @@ hi1(Str, U, Hi, I) ->
     hi1(Str, U2, Hi1, I - 1).
     hi1(Str, U2, Hi1, I - 1).
 
 
 -ifdef(OTP_RELEASE).
 -ifdef(OTP_RELEASE).
--if(OTP_RELEASE >= 23).
-hmac(Key, Str) ->
-    crypto:mac(hmac, sha256, Key, Str).
--else.
-hmac(Key, Str) ->
-    crypto:hmac(sha256, Key, Str).
--endif.
+ -if(?OTP_RELEASE >= 23).
+ hmac(Key, Str) ->
+     crypto:mac(hmac, sha256, Key, Str).
+ -else.
+ hmac(Key, Str) ->
+     crypto:hmac(sha256, Key, Str).
+ -endif.
 -else.
 -else.
 hmac(Key, Str) ->
 hmac(Key, Str) ->
     crypto:hmac(sha256, Key, Str).
     crypto:hmac(sha256, Key, Str).