diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-05-06 15:31:44 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-05-06 15:31:44 +0200 |
commit | a09d99d02fc0ffdf33b55dbcabad4a824b52c336 (patch) | |
tree | ac73e214eebb1fddb29f2c74060d670b8cccf186 /erts | |
parent | 1ab60eaaba8ba089a5b9a7d4b3119650ba08dac6 (diff) | |
download | otp-a09d99d02fc0ffdf33b55dbcabad4a824b52c336.tar.gz otp-a09d99d02fc0ffdf33b55dbcabad4a824b52c336.tar.bz2 otp-a09d99d02fc0ffdf33b55dbcabad4a824b52c336.zip |
Remove unnecessary copy in prim_file:drv_command/3
Diffstat (limited to 'erts')
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index fb0aef8947..13e8e8fb5b 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -864,9 +864,9 @@ drv_command(Port, Command) -> drv_command(Port, Command, R) when is_binary(Command) -> drv_command(Port, Command, true, R); drv_command(Port, Command, R) -> - try erlang:iolist_to_binary(Command) of - Bin -> - drv_command(Port, Bin, true, R) + try erlang:iolist_size(Command) of + _ -> + drv_command(Port, Command, true, R) catch error:Reason -> {error, Reason} |