From: bernie Date: Sun, 15 Aug 2004 06:30:06 +0000 (+0000) Subject: Make the buffer a local variable, as documented. X-Git-Tag: 1.0.0~1096 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=aa53a8f17979ad874da2d362713e69dc6c8142df;p=bertos.git Make the buffer a local variable, as documented. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@145 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/mware/xmodem.c b/mware/xmodem.c index 9041b4cc..46a6da46 100755 --- a/mware/xmodem.c +++ b/mware/xmodem.c @@ -28,6 +28,9 @@ /* * $Log$ + * Revision 1.7 2004/08/15 06:30:06 bernie + * Make the buffer a local variable, as documented. + * * Revision 1.6 2004/08/15 05:31:46 bernie * Add an #error to spread some FUD about the quality of this module; * Add a few TODOs from Rasky's review; @@ -97,10 +100,6 @@ #endif /* ARCH_BOOT */ -/*! Buffer to hold a block of data */ -static char block_buffer[XM_BUFSIZE]; - - /*! * Decode serial driver errors and print them on the display. */ @@ -125,6 +124,7 @@ static void print_serial_error(struct Serial *port, int retries) } } + /*! * \brief Receive a file using the XModem protocol. * @@ -135,6 +135,7 @@ static void print_serial_error(struct Serial *port, int retries) */ bool xmodem_recv(struct Serial *port, KFile *fd) { + char block_buffer[XM_BUFSIZE]; /* Buffer to hold a block of data */ int c, i, blocksize; int blocknr = 0, last_block_done = 0, retries = 0; char *buf; @@ -351,6 +352,7 @@ bool xmodem_recv(struct Serial *port, KFile *fd) */ bool xmodem_send(struct Serial *port, KFile *fd) { + char block_buffer[XM_BUFSIZE]; /* Buffer to hold a block of data */ size_t size = -1; int blocknr = 1, retries = 0, c, i; bool proceed, usecrc = false;