From 6b89f844909f943d7ae077bd0be4e66c3eedc699 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Tue, 15 Mar 2022 02:54:56 +0000 Subject: [PATCH] Make callback optional FossilOrigin-Name: 3e0eec086d2ada5fa906c422b49a5c9106337c251ccf4e2824937bba10a83d56 --- src/request.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/request.c b/src/request.c index 84313d8..149e75d 100644 --- a/src/request.c +++ b/src/request.c @@ -43,8 +43,9 @@ int mastodont_request(mastodont_t* data, struct mastodont_request_args* args) res = 1; goto cleanup; } - - args->callback(&results, storage, args->args); + + /* Optional */ + if (args->callback) args->callback(&results, storage, args->args); cleanup: mastodont_fetch_results_cleanup(&results);