Skip to content

Commit

Permalink
fix(PVS/V560): part of conditional expression is always true/false
Browse files Browse the repository at this point in the history
  • Loading branch information
dundargoc committed Nov 21, 2022
1 parent 5c0b017 commit bf1f548
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/nvim/api/win_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static void parse_border_title(Object title, Object title_pos, FloatConfig *fcon
return;
}

if (title.type == kObjectTypeArray && title.data.array.size == 0) {
if (title.data.array.size == 0) {
api_set_error(err, kErrorTypeValidation, "title cannot be an empty array");
return;
}
Expand All @@ -391,7 +391,6 @@ static void parse_border_title(Object title, Object title_pos, FloatConfig *fcon
fconfig->title_chunks = parse_virt_text(title.data.array, err, &fconfig->title_width);

fconfig->title = true;
return;
}

static bool parse_title_pos(Object title_pos, FloatConfig *fconfig, Error *err)
Expand Down

0 comments on commit bf1f548

Please sign in to comment.