Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop fb557b5b9 -> 21638d963


fcb; fix endless loop on corrupted FCB area.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/21638d96
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/21638d96
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/21638d96

Branch: refs/heads/develop
Commit: 21638d963dae6c0001dc8850c43a9a829ceafc3c
Parents: fb557b5
Author: Marko Kiiskila <[email protected]>
Authored: Wed Aug 3 17:21:19 2016 -0700
Committer: Marko Kiiskila <[email protected]>
Committed: Wed Aug 3 17:21:19 2016 -0700

----------------------------------------------------------------------
 sys/fcb/src/fcb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/21638d96/sys/fcb/src/fcb.c
----------------------------------------------------------------------
diff --git a/sys/fcb/src/fcb.c b/sys/fcb/src/fcb.c
index 2779575..fb85508 100644
--- a/sys/fcb/src/fcb.c
+++ b/sys/fcb/src/fcb.c
@@ -83,11 +83,15 @@ fcb_init(struct fcb *fcb)
     while (1) {
         rc = fcb_getnext_in_area(fcb, &fcb->f_active);
         if (rc == FCB_ERR_NOVAR) {
+            rc = FCB_OK;
+            break;
+        }
+        if (rc != 0) {
             break;
         }
     }
     os_mutex_init(&fcb->f_mtx);
-    return FCB_OK;
+    return rc;
 }
 
 int

Reply via email to