aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2011-05-06 15:31:44 +0200
committerBjörn-Egil Dahlberg <[email protected]>2011-05-06 15:31:44 +0200
commita09d99d02fc0ffdf33b55dbcabad4a824b52c336 (patch)
treeac73e214eebb1fddb29f2c74060d670b8cccf186 /erts/preloaded/src
parent1ab60eaaba8ba089a5b9a7d4b3119650ba08dac6 (diff)
downloadotp-a09d99d02fc0ffdf33b55dbcabad4a824b52c336.tar.gz
otp-a09d99d02fc0ffdf33b55dbcabad4a824b52c336.tar.bz2
otp-a09d99d02fc0ffdf33b55dbcabad4a824b52c336.zip
Remove unnecessary copy in prim_file:drv_command/3
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/prim_file.erl6
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}