mkiiskila commented on a change in pull request #2052: FCB Rotate Notification
URL: https://github.com/apache/mynewt-core/pull/2052#discussion_r336400252
 
 

 ##########
 File path: fs/fcb/src/fcb_append.c
 ##########
 @@ -21,6 +21,27 @@
 #include "fcb/fcb.h"
 #include "fcb_priv.h"
 
+/**
+ * Check to see if area is at the newest point
+ *
+ * @param fcb
+ *
+ * @return fap area
+ */
+struct flash_area *
+fcb_area_past_newest(struct fcb *fcb)
+{
+    struct flash_area *fap;
+
+    fap = fcb->f_active.fe_area;
 
 Review comment:
   How about this implementation instead:
   
   struct flash_area *
   fcb_area_past_newest(struct fcb *fcb)
   {
        return fcb_getnext_area(fcb, fcb->f_active.fe_area);
   }
   
   Although if you follow the suggestion I have written below, you shouldn't 
need to add this routine.

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


With regards,
Apache Git Services

Reply via email to