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

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

From:
allison
Date:
December 26, 2008 01:23
Subject:
[svn:parrot] r34371 - trunk/src/io
Message ID:
20081226092255.98123CBA12@x12.develooper.com
Author: allison
Date: Fri Dec 26 01:22:54 2008
New Revision: 34371

Modified:
   trunk/src/io/buffer.c

Log:
[cage] Remove unnecessary and nasty 'goto' from buffering code.


Modified: trunk/src/io/buffer.c
==============================================================================
--- trunk/src/io/buffer.c	(original)
+++ trunk/src/io/buffer.c	Fri Dec 26 01:22:54 2008
@@ -418,7 +418,6 @@
 
         /* if we have data available, copy out the next byte */
         if (avail) {
-ret_string:
             memcpy(s->strstart, buffer_next, len);
             s->bufused = s->strlen = len;
             return len;
@@ -446,7 +445,9 @@
     }
 
     /* if we got any data, then copy out the next byte */
-    goto ret_string;
+    memcpy(s->strstart, buffer_next, len);
+    s->bufused = s->strlen = len;
+    return len;
 }
 
 /*



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