You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/11/24 01:54:48 UTC

[3/5] incubator-mynewt-larva git commit: nffs_misc_reset() can fail if there's no memory.

nffs_misc_reset() can fail if there's no memory.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/2ce16767
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/2ce16767
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/2ce16767

Branch: refs/heads/master
Commit: 2ce16767af6014388ae05304e6957fe09ebe74b2
Parents: b32abb5
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 23 14:50:36 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 23 14:50:36 2015 -0800

----------------------------------------------------------------------
 libs/nffs/src/nffs_restore.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/2ce16767/libs/nffs/src/nffs_restore.c
----------------------------------------------------------------------
diff --git a/libs/nffs/src/nffs_restore.c b/libs/nffs/src/nffs_restore.c
index d7328fa..f776717 100644
--- a/libs/nffs/src/nffs_restore.c
+++ b/libs/nffs/src/nffs_restore.c
@@ -916,7 +916,10 @@ nffs_restore_full(const struct nffs_area_desc *area_descs)
     int i;
 
     /* Start from a clean state. */
-    nffs_misc_reset();
+    rc = nffs_misc_reset();
+    if (rc) {
+        return rc;
+    }
     nffs_restore_largest_block_data_len = 0;
 
     /* Read each area from flash. */