develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34374 - trunk/src/io

From:
cotto
Date:
December 26, 2008 02:09
Subject:
[svn:parrot] r34374 - trunk/src/io
Message ID:
20081226100909.5F3E4CBA12@x12.develooper.com
Author: cotto
Date: Fri Dec 26 02:09:08 2008
New Revision: 34374

Modified:
   trunk/src/io/buffer.c

Log:
[io] remove unnecessary code noticed by jimmy++


Modified: trunk/src/io/buffer.c
==============================================================================
--- trunk/src/io/buffer.c	(original)
+++ trunk/src/io/buffer.c	Fri Dec 26 02:09:08 2008
@@ -399,7 +399,7 @@
     size_t  avail = 0;
 
     INTVAL         buffer_flags = Parrot_io_get_buffer_flags(interp, filehandle);
-    unsigned char *buffer_next, *buffer_end;
+    unsigned char *buffer_next;
 
     STRING * const s = Parrot_io_make_string(interp, buf, 1);
 
@@ -410,19 +410,6 @@
     }
 
     buffer_next  = Parrot_io_get_buffer_next(interp, filehandle);
-    buffer_end   = Parrot_io_get_buffer_end(interp, filehandle);
-
-    /* read Data from buffer */
-    if (buffer_flags & PIO_BF_READBUF) {
-        avail = buffer_end - buffer_next;
-
-        /* if we have data available, copy out the next byte */
-        if (avail) {
-            memcpy(s->strstart, buffer_next, len);
-            s->bufused = s->strlen = len;
-            return len;
-        }
-    }
 
     /* (re)fill the buffer */
     if (! (buffer_flags & PIO_BF_READBUF)) {



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About