diff options
author | Anders Svensson <[email protected]> | 2017-04-17 22:27:25 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-06-12 16:13:52 +0200 |
commit | c20f643e9539082f969a12f0a5513e543c5dad3e (patch) | |
tree | 563c22643fdb3eca6ad1132db4dfc532672e02d8 /lib/diameter | |
parent | c5cdd4e3b4f0bad45e0c1f223835625afa873179 (diff) | |
download | otp-c20f643e9539082f969a12f0a5513e543c5dad3e.tar.gz otp-c20f643e9539082f969a12f0a5513e543c5dad3e.tar.bz2 otp-c20f643e9539082f969a12f0a5513e543c5dad3e.zip |
Optimize sub binary creation
base/diameter_codec.erl:545: Warning: OPTIMIZED: creation of sub binary delayed
Diffstat (limited to 'lib/diameter')
-rw-r--r-- | lib/diameter/src/base/diameter_codec.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl index 9acf847aba..ac74a1b9c1 100644 --- a/lib/diameter/src/base/diameter_codec.erl +++ b/lib/diameter/src/base/diameter_codec.erl @@ -542,9 +542,8 @@ msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/binary>>) -> when Avp :: #diameter_avp{}, Error :: {5014, #diameter_avp{}}. -collect_avps(#diameter_packet{bin = Bin}) -> - <<_:20/binary, Avps/binary>> = Bin, %% assert - collect_avps(Avps); +collect_avps(#diameter_packet{bin = <<_:20/binary, Avps/binary>>}) -> + collect_avps(Avps, 0, []); collect_avps(Bin) when is_binary(Bin) -> |