From: Chenghai Huang huangchenghai2@huawei.com
Replace strncpy with memcpy to avoid compilation warnings.
Signed-off-by: Chenghai Huang huangchenghai2@huawei.com --- wd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wd.c b/wd.c index 2d9a42c..abadcf9 100644 --- a/wd.c +++ b/wd.c @@ -426,7 +426,7 @@ handle_t wd_request_ctx(struct uacce_dev *dev)
wd_ctx_init_qfrs_offs(ctx);
- strncpy(ctx->dev_path, dev->char_dev_path, MAX_DEV_NAME_LEN); + memcpy(ctx->dev_path, dev->char_dev_path, MAX_DEV_NAME_LEN); ctx->dev_path[MAX_DEV_NAME_LEN - 1] = '\0';
return (handle_t)ctx;