From 20a5845a4789f7c4fee8126584dcf25fc75c391f Mon Sep 17 00:00:00 2001 From: Lee Duhem Date: Thu, 11 Dec 2014 09:58:53 +0800 Subject: [PATCH] tcc.h (BufferedFile): Remove unnecessary static memory allocation The memory needed by `buffer' will be allocated in `tcc_open_bf', these is no need to allocate them in BufferedFile statically. --- tcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcc.h b/tcc.h index c93cedf..ccbaa71 100644 --- a/tcc.h +++ b/tcc.h @@ -494,7 +494,7 @@ typedef struct BufferedFile { int ifndef_macro_saved; /* saved ifndef_macro */ int *ifdef_stack_ptr; /* ifdef_stack value at the start of the file */ char filename[1024]; /* filename */ - unsigned char buffer[IO_BUF_SIZE + 1]; /* extra size for CH_EOB char */ + unsigned char buffer[1]; /* extra size for CH_EOB char */ } BufferedFile; #define CH_EOB '\\' /* end of buffer or '\0' char in file */ -- 1.9.3