Merge pull request #38 from robertbaldyga/remove-name_size

Remove name_size field from cache and core config
This commit is contained in:
Michał Mielewczyk 2019-01-14 16:04:16 +01:00 committed by GitHub
commit f11db9c31a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {