From: batt Date: Thu, 25 Sep 2008 17:38:55 +0000 (+0000) Subject: Remove unneeded goto. X-Git-Tag: 2.0.0~84 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2cf920f074fa5d5283a3391b92d7ace1c63f3055;p=bertos.git Remove unneeded goto. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1850 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/fs/battfs.c b/bertos/fs/battfs.c index fd07efac..f85d8c96 100644 --- a/bertos/fs/battfs.c +++ b/bertos/fs/battfs.c @@ -514,7 +514,7 @@ bool battfs_init(struct BattFsSuper *disk) */ bool battfs_fsck(struct BattFsSuper *disk) { - #define FSCHECK(cond) do { if(!(cond)) { LOG_ERR("\"" #cond "\"\n"); goto fsck_err; } } while (0) + #define FSCHECK(cond) do { if(!(cond)) { LOG_ERR("\"" #cond "\"\n"); return false } } while (0) FSCHECK(disk->free_page_start <= disk->page_count); FSCHECK(disk->data_size < disk->page_size); @@ -561,9 +561,6 @@ bool battfs_fsck(struct BattFsSuper *disk) FSCHECK(free_bytes == disk->free_bytes); FSCHECK(files < BATTFS_MAX_FILES); return true; - - fsck_err: - return false; } /**