Skip to content

Commit

Permalink
[F] Fixed cppcheck warning
Browse files Browse the repository at this point in the history
  • Loading branch information
seleznevae committed Dec 4, 2018
1 parent 354aec6 commit 9327d80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fort.c
Original file line number Diff line number Diff line change
Expand Up @@ -3523,8 +3523,8 @@ void destroy_row(fort_row_t *row)
if (row == NULL)
return;

size_t i = 0;
if (row->cells) {
size_t i = 0;
size_t cells_n = vector_size(row->cells);
for (i = 0; i < cells_n; ++i) {
fort_cell_t *cell = *(fort_cell_t **)vector_at(row->cells, i);
Expand Down
2 changes: 1 addition & 1 deletion src/row.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void destroy_row(fort_row_t *row)
if (row == NULL)
return;

size_t i = 0;
if (row->cells) {
size_t i = 0;
size_t cells_n = vector_size(row->cells);
for (i = 0; i < cells_n; ++i) {
fort_cell_t *cell = *(fort_cell_t **)vector_at(row->cells, i);
Expand Down

0 comments on commit 9327d80

Please sign in to comment.