You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2019/09/23 16:55:58 UTC
[mynewt-core] 09/13: sys/log;
fix incorrect if statement in log_fcb2_copy().
This is an automated email from the ASF dual-hosted git repository.
marko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit fba8e26809e399f09c23b449a0074f4a7cba0f76
Author: Marko Kiiskila <ma...@apache.org>
AuthorDate: Fri Aug 30 11:23:44 2019 +0300
sys/log; fix incorrect if statement in log_fcb2_copy().
---
sys/log/full/src/log_fcb2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/log/full/src/log_fcb2.c b/sys/log/full/src/log_fcb2.c
index 7a141cf..f59883e 100644
--- a/sys/log/full/src/log_fcb2.c
+++ b/sys/log/full/src/log_fcb2.c
@@ -770,8 +770,8 @@ log_fcb2_copy(struct log *log, struct fcb *src_fcb, struct fcb *dst_fcb,
memset(&entry, 0, sizeof(entry));
while (!fcb_getnext(src_fcb, &entry)) {
if (!copy) {
- if (from && entry.fe_range != from->fe_range &&
- entry.fe_data_off != from->fe_data_off) {
+ if (from && (entry.fe_range != from->fe_range ||
+ entry.fe_data_off != from->fe_data_off)) {
continue;
}
copy = 1;