Code refactoring

Removed few dead assignments and added variables initialization.
This commit is contained in:
Michal Mielewczyk
2019-01-16 03:58:09 -05:00
parent b9fce50783
commit 916f46c893
7 changed files with 8 additions and 10 deletions

View File

@@ -284,7 +284,7 @@ static int _ocf_cleaner_fire_flush_cache(struct ocf_request *req)
return -ENOMEM;
}
ocf_io_configure(io, 0, 0, OCF_WRITE, 0, 0);
ocf_io_configure(io, 0, 0, OCF_WRITE, 0, 0);
ocf_io_set_cmpl(io, req, NULL, _ocf_cleaner_flush_cache_io_end);
ocf_dobj_submit_flush(io);
@@ -941,7 +941,6 @@ void ocf_cleaner_fire(struct ocf_cache *cache,
if (err)
_ocf_cleaner_fire_error(master, req, err);
req = NULL;
i_out = 0;
}
/* prevent cleaning completion race */

View File

@@ -41,7 +41,7 @@ void ocf_lst_sort(struct ocf_lst *lst)
} else {
/* search for place where put element at the list */
struct ocf_lst_entry *pos;
ocf_cache_line_t pos_idx = lst->invalid;
ocf_cache_line_t pos_idx;
for_each_lst(lst, pos, pos_idx)
if (lst->cmp(lst->cache, pos, iter) > 0)