From a09d99d02fc0ffdf33b55dbcabad4a824b52c336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 6 May 2011 15:31:44 +0200 Subject: Remove unnecessary copy in prim_file:drv_command/3 --- erts/preloaded/src/prim_file.erl | 6 +++--- 1 file 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} -- cgit v1.2.3 From c159e558ee9724eb160f9047c34ffc2a6a9d0da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 6 May 2011 15:36:40 +0200 Subject: Update prim_file.beam --- erts/preloaded/ebin/prim_file.beam | Bin 31588 -> 31528 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam index c2ae01d0d5..bfb1e48365 100644 Binary files a/erts/preloaded/ebin/prim_file.beam and b/erts/preloaded/ebin/prim_file.beam differ -- cgit v1.2.3