]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
Increase read buffer size for io_stream to 64kiB
authorAchim Gratz <Stromeko@Stromeko.DE>
Thu, 11 Jun 2015 04:20:50 +0000 (06:20 +0200)
committerAchim Gratz <Stromeko@Stromeko.DE>
Thu, 11 Jun 2015 04:20:50 +0000 (06:20 +0200)
ChangeLog
io_stream.cc

index b2b3ae0576940ec6ea391f83bd2cf624fd48cc29..958e6fe8bbd9e46fed8e4ff169d0b5765c6012fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-11  Achim Gratz  <Stromeko@NexGo.DE>
+
+       * io_stream.cc (copy): Increase read buffer size for io_stream to
+       64kiB.  Use sizeof operator instead of repeating magic constant.
+
 2015-06-07  Achim Gratz  <Stromeko@NexGo.DE>
 
        * ini.h: Add macros for use within the implementation of the
index 8a550ad54f203c8669cad03247230466d4984fd9..8a1d635feb5eab947baed9efb8a0870a127b0817 100644 (file)
@@ -170,11 +170,11 @@ ssize_t io_stream::copy (io_stream * in, io_stream * out)
   if (!in || !out)
     return -1;
   char
-    buffer[16384];
+    buffer[65536];
   ssize_t
     countin,
     countout;
-  while ((countin = in->read (buffer, 16384)) > 0)
+  while ((countin = in->read (buffer, sizeof(buffer))) > 0)
     {
       countout = out->write (buffer, countin);
       if (countout != countin)
This page took 0.041202 seconds and 5 git commands to generate.