From: Andy Lester Date: Mon, 30 May 2005 22:28:36 +0000 (-0500) Subject: ByteLoader.xs cleanup X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4b31f1384a4da7df10c2175e609a8c1c5216ef1d;p=p5sagit%2Fp5-mst-13.2.git ByteLoader.xs cleanup Message-ID: <20050531032836.GA32198@petdance.com> p4raw-id: //depot/perl@24645 --- diff --git a/ext/ByteLoader/ByteLoader.xs b/ext/ByteLoader/ByteLoader.xs index e71b7cd..679298e 100644 --- a/ext/ByteLoader/ByteLoader.xs +++ b/ext/ByteLoader/ByteLoader.xs @@ -45,11 +45,10 @@ bl_read(struct byteloader_fdata *data, char *buf, size_t size, size_t n) len -= data->next_out; if (len) { memmove (start, start + data->next_out, len + 1); - SvCUR_set (data->datasv, len); } else { *start = '\0'; /* Avoid call to memmove. */ - SvCUR_set (data->datasv, 0); } + SvCUR_set(data->datasv, len); data->next_out = 0; /* Attempt to read more data. */ @@ -81,6 +80,8 @@ byteloader_filter(pTHX_ int idx, SV *buf_sv, int maxlen) struct byteloader_state bstate; struct byteloader_fdata data; int len; + (void)buf_sv; + (void)maxlen; data.next_out = 0; data.datasv = FILTER_DATA(idx);