Since the third agrument of strncpy means maximum permitted size of
destination, using length of source string cause warning as like
"specified bound depends on the length of the source argument". This
fixes warning to use NAME_MAX instead of source length.
Change-Id: I07399700ea454100ca0924c93eca6a99cb54b8cd
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
}
if (entry) {
- strncpy(entry->scenario, data->scenario, strlen(data->scenario) + 1);
+ strncpy(entry->scenario, data->scenario, NAME_MAX);
} else {
entry = malloc(sizeof(*data));
if (!entry)