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

 ##########
 File path: sys/log/full/src/log_fcb.c
 ##########
 @@ -527,6 +529,48 @@ log_fcb_walk(struct log *log, log_walk_func_t walk_func,
     return 0;
 }
 
+static int
+log_fcb_walk_sector(struct log *log, log_walk_func_t walk_func,
 
 Review comment:
   This routine is almost a full duplicate of log_fcb_walk(). Instead of 
implementing 2 separate functions doing the same thing, you should create a 
common routine which does the actual work (e.g log_fcb_walk_impl(). Add a shim 
functions for log_fcb_walk() and log_fcb_walk_area(), which pass an extra 
parameter to log_fcb_walk_impl(). log_fcb_walk_area() passes a parameter 
which'll get log_fcb_walk_impl() to abort if fcb_getnext() call changes areas. 
The same kind of check is done within conf_fcb_compress_internal().

----------------------------------------------------------------
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