changeset 2423:82aabda670f8

Fix memory allocation for FLASH/FIS - could have been wrong if some other function allocated memory first
author gthomas
date Tue, 28 Aug 2007 10:59:52 +0000
parents a703e82c8115
children 4c366bd69cd5
files packages/redboot/current/ChangeLog packages/redboot/current/src/flash.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog
+++ b/packages/redboot/current/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-28  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/flash.c (do_flash_init): Memory allocation was slightly
+	incorrect - 'workspace_end' should always be used to find 
+	the end of available memory.
+
 2007-08-08  Peter Korsgaard  <peter.korsgaard@barco.com>
 
 	* include/net/http.h:
--- a/packages/redboot/current/src/flash.c
+++ b/packages/redboot/current/src/flash.c
@@ -1600,7 +1600,7 @@ do_flash_init(void)
             return -1;
 	}
 # else
-        workspace_end = (unsigned char *)(workspace_end_init-fisdir_size);
+        workspace_end = (unsigned char *)(workspace_end-fisdir_size);
         fis_work_block = workspace_end;
 # endif
         if (CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK < 0) {