add snd_strlcpy() and use it everywhere

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-03-25 16:45:43 +01:00
parent 639d404df6
commit 1755df1d9e
14 changed files with 74 additions and 61 deletions

View file

@ -282,15 +282,6 @@ struct tplg_elem *tplg_elem_lookup(struct list_head *base,
struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg,
snd_config_t *cfg, const char *name, enum snd_tplg_type type);
static inline void elem_copy_text(char *dest, const char *src, int len)
{
if (!dest || !src || !len)
return;
strncpy(dest, src, len);
dest[len - 1] = 0;
}
int tplg_parse_channel(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
snd_config_t *cfg, void *private);