Skip to content

Commit

Permalink
fix(stream): avoid using designated initializer
Browse files Browse the repository at this point in the history
Signed-off-by: Abhra303 <chakrabortyabhradeep79@gmail.com>
  • Loading branch information
Abhra303 committed May 18, 2023
1 parent c111d4d commit c12bcdc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server/stream_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,11 @@ OpResult<streamID> OpAdd(const OpArgs& op_args, string_view key, const AddOpts&
streamTrimByID(stream_inst, opts.minid.val, opts.trim_approx);
}
} else {
streamAddTrimArgs add_args = {
.trim_strategy = static_cast<int>(opts.trim_strategy),
.approx_trim = opts.trim_approx,
.limit = opts.limit,
};
streamAddTrimArgs add_args;
add_args.trim_strategy = static_cast<int>(opts.trim_strategy);
add_args.approx_trim = opts.trim_approx;
add_args.limit = opts.limit;

if (opts.trim_strategy == TrimStrategy::kAddOptsTrimMaxLen) {
add_args.maxlen = opts.max_len;
} else if (opts.trim_strategy == TrimStrategy::kAddOptsTrimMinId) {
Expand Down

0 comments on commit c12bcdc

Please sign in to comment.