diff packages/devs/flash/synth/current/src/synth.c @ 2696:b1cdd12003cd

* src/synth.c: Fixed error check of mmap call.
author asl
date Mon, 22 Dec 2008 20:05:02 +0000
parents 3e8e26d3183a
children 74dbf4c3f2e1
line wrap: on
line diff
--- a/packages/devs/flash/synth/current/src/synth.c
+++ b/packages/devs/flash/synth/current/src/synth.c
@@ -124,9 +124,9 @@ flash_hwr_init(void)
                 |CYG_HAL_SYS_MAP_FIXED
 #endif
                 , cyg_dev_flash_synth_flashfd, 0 );
-    CYG_ASSERT( cyg_dev_flash_synth_base > 0, "mmap of flash file failed!" );
+    CYG_ASSERT( cyg_dev_flash_synth_base != (void *) -1, "mmap of flash file failed!" );
 
-    if (cyg_dev_flash_synth_base <= 0) {
+    if (cyg_dev_flash_synth_base == (void *) -1) {
         return FLASH_ERR_HWR;
     }
     flash_info.start = cyg_dev_flash_synth_base;