[Pkg-running-devel] [openambit] 14/131: The skip_cb is not mandatory, check for NULL-pointer!

Christian Perrier bubulle at moszumanska.debian.org
Thu Jul 17 20:19:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository openambit.

commit d58a690ea438b8984e2d64f647c6a0319eeb3e90
Author: Emil Ljungdahl <emil at kratern.se>
Date:   Sat Dec 14 09:28:56 2013 +0100

    The skip_cb is not mandatory, check for NULL-pointer!
---
 src/libambit/libambit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libambit/libambit.c b/src/libambit/libambit.c
index 54abebe..9132235 100644
--- a/src/libambit/libambit.c
+++ b/src/libambit/libambit.c
@@ -344,7 +344,7 @@ int libambit_log_read(ambit_object_t *object, ambit_log_skip_cb skip_cb, ambit_l
                 progress_cb(userref, log_entries_total, log_entries_walked+1, 100*log_entries_walked/log_entries_total);
             }
             // Check if this entry needs to be read
-            if (skip_cb(userref, &log_header) != 0) {
+            if (skip_cb == NULL || skip_cb(userref, &log_header) != 0) {
                 log_entry = libambit_pmem20_read_entry(object);
                 if (log_entry != NULL) {
                     if (push_cb != NULL) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git



More information about the Pkg-running-devel mailing list