aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_gen.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-08-31 09:53:45 +0200
committerAnders Svensson <[email protected]>2017-09-01 17:22:36 +0200
commit36a64980960077558dcfd0e181a65753856f331c (patch)
treeccdb00043e8e2d9507062be8ee1313372b60df60 /lib/diameter/src/base/diameter_gen.erl
parent99db256e992591ab5cd03d77adcd4ad8d8a16a7e (diff)
downloadotp-36a64980960077558dcfd0e181a65753856f331c.tar.gz
otp-36a64980960077558dcfd0e181a65753856f331c.tar.bz2
otp-36a64980960077558dcfd0e181a65753856f331c.zip
Rename decode_format false to none
Which reads better and makes it easier to distinguish this false from others.
Diffstat (limited to 'lib/diameter/src/base/diameter_gen.erl')
-rw-r--r--lib/diameter/src/base/diameter_gen.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl
index e8f637dd53..0aea982a54 100644
--- a/lib/diameter/src/base/diameter_gen.erl
+++ b/lib/diameter/src/base/diameter_gen.erl
@@ -527,7 +527,7 @@ decode1(Data, Name, {AvpName, Type}, Mod, Fmt, Opts, Avp) ->
%% set/4
-set('Grouped', false, Avp, V) ->
+set('Grouped', none, Avp, V) ->
{_Rec, As} = V,
[Avp | As];
@@ -542,7 +542,7 @@ set(_, _, Avp, V) ->
%%
%% Error when decoding a grouped AVP.
-decode_error(true, false, _, Avp) ->
+decode_error(true, none, _, Avp) ->
Avp;
decode_error(true, _, {Rec, _, _}, Avp) ->
@@ -735,8 +735,9 @@ pack(Arity, F, Avp, Mod, [Failed | Rec]) ->
%% set/5
-set(_, _, _, _, false = No) ->
- No;
+set(_, _, _, _, None)
+ when is_atom(None) ->
+ None;
set(1, F, Value, _, Map)
when is_map(Map) ->
@@ -830,7 +831,7 @@ empty(Name, #{module := Mod} = Opts) ->
%% newrec/4
-newrec(false, _, Name, _) ->
+newrec(none, _, Name, _) ->
Name;
newrec(record, Mod, Name, T)