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/10/21 09:30:28 UTC

[mynewt-core] 07/23: Added handling around function if func_ptrs are not set.

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 aaad14593cb08cba34ffdc0034215df99c33781d
Author: Nolan Lau <no...@juul.com>
AuthorDate: Thu Oct 17 11:20:48 2019 -0700

    Added handling around function if func_ptrs are not set.
---
 sys/log/full/src/log.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/log/full/src/log.c b/sys/log/full/src/log.c
index 29b56c8..8a7c15f 100644
--- a/sys/log/full/src/log.c
+++ b/sys/log/full/src/log.c
@@ -932,9 +932,17 @@ log_walk_body_section(struct log *log, log_walk_body_func_t walk_body_func,
     int rc;
 
     log_offset->lo_arg = &lwba;
+
+    if (!log->l_log->log-walk_sector)
+    {
+        rc = ENOTSUP;
+        goto err;
+    }
+
     rc = log->l_log->log_walk_sector(log, log_walk_body_fn, log_offset);
     log_offset->lo_arg = lwba.arg;
 
+err:
     return rc;
 }