diff options
author | Anders Svensson <[email protected]> | 2017-04-22 23:57:48 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-06-12 16:13:52 +0200 |
commit | 7aec6ad7e56a377bf84fe833dfde43f52263224a (patch) | |
tree | 51f2bf9c375d5c334dbbb7b2e6c4c9c1bb28c956 /lib | |
parent | 6e753c9861effb4ae820d7b1ad20fdb66dca34f6 (diff) | |
download | otp-7aec6ad7e56a377bf84fe833dfde43f52263224a.tar.gz otp-7aec6ad7e56a377bf84fe833dfde43f52263224a.tar.bz2 otp-7aec6ad7e56a377bf84fe833dfde43f52263224a.zip |
Use avp_arity/1 when creating a zero group
Converting with list_to_binary/1 appears to be faster than the
equivalent binary comprehension:
<< (z(F,A)) || {F,A} <- avp_arity(Name) >>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diameter/include/diameter_gen.hrl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl index 3c59370e73..f788264647 100644 --- a/lib/diameter/include/diameter_gen.hrl +++ b/lib/diameter/include/diameter_gen.hrl @@ -733,10 +733,7 @@ grouped_decode(Name, ComponentAvps) -> %% --------------------------------------------------------------------------- empty_group(Name) -> - list_to_binary(empty_body(Name)). - -empty_body(Name) -> - [z(F, avp_arity(Name, F)) || F <- '#info-'(name2rec(Name), fields)]. + list_to_binary([z(F,A) || {F,A} <- avp_arity(Name)]). z(Name, 1) -> z(Name); |