You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/12/13 23:03:35 UTC

[GitHub] ccollins476ad closed pull request #1563: sys/flash_map: Don't replace default flash map with empty flash map

ccollins476ad closed pull request #1563: sys/flash_map: Don't replace default flash map with empty flash map
URL: https://github.com/apache/mynewt-core/pull/1563
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sys/fault/src/fault.c b/sys/fault/src/fault.c
index 22f28bb766..55a40fcd0e 100644
--- a/sys/fault/src/fault.c
+++ b/sys/fault/src/fault.c
@@ -20,7 +20,6 @@
 #include "os/mynewt.h"
 
 #include "modlog/modlog.h"
-#include "data_recorder/faults.h"
 #include "fault/fault.h"
 #include "fault_priv.h"
 
diff --git a/sys/flash_map/src/flash_map.c b/sys/flash_map/src/flash_map.c
index 1cab37efce..98c58d0ebe 100644
--- a/sys/flash_map/src/flash_map.c
+++ b/sys/flash_map/src/flash_map.c
@@ -423,7 +423,7 @@ flash_map_init(void)
      */
     rc = flash_map_read_mfg(sizeof mfg_areas / sizeof mfg_areas[0],
                             mfg_areas, &num_areas);
-    if (rc == 0) {
+    if (rc == 0 && num_areas > 0) {
         flash_map = mfg_areas;
         flash_map_entries = num_areas;
     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services