Remove name_size field from cache and core config

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2019-01-14 15:00:34 +01:00
parent 2af3b81370
commit 322f1aeffd
3 changed files with 2 additions and 12 deletions

View File

@ -40,11 +40,6 @@ struct ocf_mngt_core_config {
*/
const char *name;
/**
* @brief OCF core name size
*/
size_t name_size;
/**
* @brief OCF cache ID number
*/
@ -215,11 +210,6 @@ struct ocf_mngt_cache_config {
*/
const char *name;
/**
* @brief Size of cache name
*/
size_t name_size;
/**
* @brief Cache mode
*/

View File

@ -715,7 +715,7 @@ static int _ocf_mngt_init_prepare_cache(struct ocf_cachemng_init_params *param,
if (cfg->name) {
ret = env_strncpy(cache_name, sizeof(cache_name),
cfg->name, cfg->name_size);
cfg->name, sizeof(cache_name));
if (ret)
goto out;
} else {

View File

@ -377,7 +377,7 @@ int ocf_mngt_cache_add_core_nolock(ocf_cache_t cache, ocf_core_t *core,
if (cfg->name) {
result = env_strncpy(core_name, sizeof(core_name), cfg->name,
cfg->name_size);
sizeof(core_name));
if (result)
return result;
} else {