else
return -EINVAL;
} else if (MATCH(result->name, "pass_res_name")) {
- int len = strlen(result->value);
- snprintf(conf_data->res_name, len + 1, "%s", result->value);
+ snprintf(conf_data->res_name, PASS_NAME_LEN, "%s", result->value);
} else if (MATCH(result->name, "pass_path_conf_file")) {
- int len = strlen(result->value);
- snprintf(conf_data->path_conf_file, len + 1, "%s", result->value);
+ snprintf(conf_data->path_conf_file, PASS_NAME_LEN, "%s", result->value);
} else if (MATCH(result->name, "pass_path_load_table")) {
- int len = strlen(result->value);
- snprintf(conf_data->path_load_table, len + 1, "%s", result->value);
+ snprintf(conf_data->path_load_table, PASS_NAME_LEN, "%s", result->value);
} else if (MATCH(result->name, "pass_first_cpu")) {
int pass_res_type = conf_data->res_type;
*/
struct pass_conf_data {
unsigned int res_type;
- char res_name[128];
- char path_conf_file[128];
- char path_load_table[128];
+ char res_name[PASS_NAME_LEN];
+ char path_conf_file[PASS_NAME_LEN];
+ char path_load_table[PASS_NAME_LEN];
unsigned int num_cpus;
unsigned int cpu;