int r;
uint64_t np = 0;
- Object *n;
assert(j);
assert(m);
assert(np > 0);
- r = journal_file_move_to_object(f, OBJECT_ENTRY, np, &n);
- if (r < 0)
- return r;
+ if (ret) {
+ r = journal_file_move_to_object(f, OBJECT_ENTRY, np, ret);
+ if (r < 0)
+ return r;
+ }
- if (ret)
- *ret = n;
if (offset)
*offset = np;
} else if (m->type == MATCH_OR_TERM) {
uint64_t np = 0;
- Object *n;
/* Find the earliest match */
if (np == 0)
return 0;
- r = journal_file_move_to_object(f, OBJECT_ENTRY, np, &n);
- if (r < 0)
- return r;
+ if (ret) {
+ r = journal_file_move_to_object(f, OBJECT_ENTRY, np, ret);
+ if (r < 0)
+ return r;
+ }
- if (ret)
- *ret = n;
if (offset)
*offset = np;