Skip to content

Commit

Permalink
store: Make stop const
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Nov 9, 2024
1 parent 02ba241 commit f235d40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ bool cs_snip_iter(struct ref_guard *guard, enum cs_iter_direction direction,

struct cs_snip *oldest = guard->cs->snips;
struct cs_snip *newest = oldest + (guard->cs->header->nr_snips - 1);
struct cs_snip *stop = direction == CS_ITER_NEWEST_FIRST ? oldest : newest;
const struct cs_snip *stop =
direction == CS_ITER_NEWEST_FIRST ? oldest : newest;

if (!*snip) {
*snip = direction == CS_ITER_NEWEST_FIRST ? newest : oldest;
Expand Down

0 comments on commit f235d40

Please sign in to comment.