vrahane commented on code in PR #3168:
URL: https://github.com/apache/mynewt-core/pull/3168#discussion_r1669260014


##########
sys/log/full/src/log.c:
##########
@@ -964,16 +1143,16 @@ log_read(struct log *log, const void *dptr, void *buf, 
uint16_t off,
 int
 log_read_hdr(struct log *log, const void *dptr, struct log_entry_hdr *hdr)
 {
-    int bytes_read;
+    int bytes_read = 0;
 
     bytes_read = log_read(log, dptr, hdr, 0, LOG_BASE_ENTRY_HDR_SIZE);
     if (bytes_read != LOG_BASE_ENTRY_HDR_SIZE) {
         return SYS_EIO;
     }
 
     if (hdr->ue_flags & LOG_FLAGS_IMG_HASH) {
-        bytes_read = log_read(log, dptr, hdr->ue_imghash,
-                              LOG_BASE_ENTRY_HDR_SIZE, LOG_IMG_HASHLEN);
+        bytes_read = log_read(log, dptr, hdr->ue_imghash, 
LOG_BASE_ENTRY_HDR_SIZE,
+                              LOG_IMG_HASHLEN);

Review Comment:
   Left over from intermittent changes. Will fix it. 



-- 
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: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to