kasjer commented on code in PR #3365:
URL: https://github.com/apache/mynewt-core/pull/3365#discussion_r1984572837


##########
sys/log/full/src/log_fcb.c:
##########
@@ -209,13 +215,21 @@ log_fcb_start_append(struct log *log, int len, struct 
fcb_entry *loc)
     struct fcb_log *fcb_log;
     struct flash_area *old_fa;
     int rc = 0;
+#if MYNEWT_VAL(LOG_FCB_SECTOR_BOOKMARKS)
+    int active_sector_cnt = 0;

Review Comment:
   Comment `/* Cache sector count before appending */` is still misleading.
   
   There is no point in initializing `active_id` twice. (same for `idx`)
   
   Considering that `f_active_id` is uint16_t, condition
   ```c
   if (fcb->f_active_id > active_id) {
   ```
   probably would be more future proof this way:
   ```c
   if (fcb->f_active_id != active_id) {
   ```
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to