Skip to content

Commit

Permalink
【修正】log 模块在开启编译优化时,可能运行不正常的问题。
Browse files Browse the repository at this point in the history
Signed-off-by: armink <[email protected]>
  • Loading branch information
armink committed May 2, 2019
1 parent 4461259 commit 64e35ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions easyflash/src/ef_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static uint32_t find_sec_using_end_addr(uint32_t addr) {

EF_ASSERT(READ_BUF_SIZE % 4 == 0);
/* calculate the sector start and data start address */
sector_start = addr / EF_ERASE_MIN_SIZE * EF_ERASE_MIN_SIZE;
sector_start = addr & (~(EF_ERASE_MIN_SIZE - 1));
data_start = sector_start + LOG_SECTOR_HEADER_SIZE;

/* counts continuous 0xFF which is end of sector */
Expand Down Expand Up @@ -384,7 +384,7 @@ static void find_start_and_end_addr(void) {
/* find the end address */
log_end_addr = find_sec_using_end_addr(cur_using_sec_addr);
}

}

/**
Expand Down

0 comments on commit 64e35ae

Please sign in to comment.