From bf5a2e34368228538436a3856fd69167a6897516 Mon Sep 17 00:00:00 2001 From: Qi Tao Date: Mon, 4 Dec 2023 17:25:47 +0800 Subject: [PATCH 100/114] uadk: bugfix Replace strncpy with memcpy to avoid compilation warnings. Signed-off-by: Chenghai Huang --- wd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wd.c b/wd.c index be374f5..b08abab 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; -- 2.25.1