Make callback optional

FossilOrigin-Name: 3e0eec086d2ada5fa906c422b49a5c9106337c251ccf4e2824937bba10a83d56
This commit is contained in:
me@ow.nekobit.net 2022-03-15 02:54:56 +00:00
parent 88dcf586f5
commit 6b89f84490

View file

@ -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);