aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/include/diameter_gen.hrl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-04-14 15:50:15 +0200
committerAnders Svensson <[email protected]>2017-06-12 16:13:52 +0200
commit3da3055f5c807c3c11a349cba6c19a5abc6bc1c7 (patch)
tree5b29b725aaa89c9100ebf03ba1282b29fb6857e9 /lib/diameter/include/diameter_gen.hrl
parentdfeb8b9193ba716518cb632de8589aea378c178e (diff)
downloadotp-3da3055f5c807c3c11a349cba6c19a5abc6bc1c7.tar.gz
otp-3da3055f5c807c3c11a349cba6c19a5abc6bc1c7.tar.bz2
otp-3da3055f5c807c3c11a349cba6c19a5abc6bc1c7.zip
Remove bloat from zero encode
Don't call a function when we know the result, and consistently return a binary.
Diffstat (limited to 'lib/diameter/include/diameter_gen.hrl')
-rw-r--r--lib/diameter/include/diameter_gen.hrl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl
index 9a5ca8e09f..dd8c720e68 100644
--- a/lib/diameter/include/diameter_gen.hrl
+++ b/lib/diameter/include/diameter_gen.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2017. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -719,7 +719,7 @@ z(Name, 1) ->
z(_, {0,_}) ->
[];
z(Name, {Min, _}) ->
- lists:duplicate(Min, z(Name)).
+ binary:copy(z(Name), Min).
z('AVP') ->
<<0:64/integer>>; %% minimal header