Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-10-11 06:37:10 +0400
committerJonathan Nieder <jrnieder@gmail.com>2011-02-26 13:57:58 +0300
commit4d21bec0d2c2f83e3f1e84edae5a3259cdab862f (patch)
treecb19ed194d08cc489590a663b1c6bf4edb1a8d4d /vcs-svn
parent8dc6a373d201839859fe7924b63e57526ee2fc22 (diff)
vcs-svn: eliminate global byte_buffer
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>
Diffstat (limited to 'vcs-svn')
-rw-r--r--vcs-svn/line_buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c
index 1543567093..f22c94f025 100644
--- a/vcs-svn/line_buffer.c
+++ b/vcs-svn/line_buffer.c
@@ -14,7 +14,6 @@
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)
@@ -68,6 +67,7 @@ char *buffer_read_string(uint32_t len)
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;
@@ -83,6 +83,7 @@ void buffer_copy_bytes(uint32_t 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;