summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8dc6a37)
raw | patch | inline | side by side (parent: 8dc6a37)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 11 Oct 2010 02:37:10 +0000 (21:37 -0500) | ||
committer | Jonathan Nieder <jrnieder@gmail.com> | |
Sat, 26 Feb 2011 10:57:58 +0000 (04:57 -0600) |
The data stored in byte_buffer[] is always either discarded or
written to stdout immediately. No need for it to persist between
function calls.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
written to stdout immediately. No need for it to persist between
function calls.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
vcs-svn/line_buffer.c | patch | blob | history |
diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c
index 1543567093fad603e09ba61b2fc47ec232b4cae2..f22c94f025ae720ac7f6c333d6de1a04662e7a9b 100644 (file)
--- a/vcs-svn/line_buffer.c
+++ b/vcs-svn/line_buffer.c
obj_pool_gen(blob, char, 4096)
static char line_buffer[LINE_BUFFER_LEN];
-static char byte_buffer[COPY_BUFFER_LEN];
static FILE *infile;
int buffer_init(const char *filename)
void buffer_copy_bytes(uint32_t len)
{
+ char byte_buffer[COPY_BUFFER_LEN];
uint32_t in;
while (len > 0 && !feof(infile) && !ferror(infile)) {
in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;
void buffer_skip_bytes(uint32_t len)
{
+ char byte_buffer[COPY_BUFFER_LEN];
uint32_t in;
while (len > 0 && !feof(infile) && !ferror(infile)) {
in = len < COPY_BUFFER_LEN ? len : COPY_BUFFER_LEN;