From b3e379e2b24455afc75272dd0f3cb2e9d4600024 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 17 Nov 2021 00:58:17 +0900 Subject: fix strncpy warnings --- src/pcm_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pcm_plugin.c') diff --git a/src/pcm_plugin.c b/src/pcm_plugin.c index 15bfc80..610b5d9 100644 --- a/src/pcm_plugin.c +++ b/src/pcm_plugin.c @@ -153,9 +153,9 @@ static int pcm_plug_info(struct pcm_plug_data *plug_data, return ret; } - strncpy((char *)info->id, name, sizeof(info->id)); - strncpy((char *)info->name, name, sizeof(info->name)); - strncpy((char *)info->subname, name, sizeof(info->subname)); + strncpy((char *)info->id, name, sizeof(info->id) - 1); + strncpy((char *)info->name, name, sizeof(info->name) - 1); + strncpy((char *)info->subname, name, sizeof(info->subname) - 1); info->subdevices_count = 1; -- cgit v1.2.3