summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/go7007/snd-go7007.c
diff options
context:
space:
mode:
authorChen Gang2013-03-20 03:26:09 +0100
committerMauro Carvalho Chehab2013-03-23 14:37:18 +0100
commit1c3fc152b8ebadd59814767e3189c961b73f20c8 (patch)
tree49d9e586f83572c90d3cafaefb535536938c90ad /drivers/staging/media/go7007/snd-go7007.c
parent[media] media: radio: add module alias entry for radio-si4713 (diff)
downloadkernel-qcow2-linux-1c3fc152b8ebadd59814767e3189c961b73f20c8.tar.gz
kernel-qcow2-linux-1c3fc152b8ebadd59814767e3189c961b73f20c8.tar.xz
kernel-qcow2-linux-1c3fc152b8ebadd59814767e3189c961b73f20c8.zip
[media] drivers/staging/media/go7007: using strlcpy instead of strncpy
for NUL terminated string, need always set 0 in the end. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/media/go7007/snd-go7007.c')
-rw-r--r--drivers/staging/media/go7007/snd-go7007.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/go7007/snd-go7007.c b/drivers/staging/media/go7007/snd-go7007.c
index 5af29ff68bfd..6f6271ec558c 100644
--- a/drivers/staging/media/go7007/snd-go7007.c
+++ b/drivers/staging/media/go7007/snd-go7007.c
@@ -267,9 +267,9 @@ int go7007_snd_init(struct go7007 *go)
kfree(gosnd);
return ret;
}
- strncpy(gosnd->card->driver, "go7007", sizeof(gosnd->card->driver));
- strncpy(gosnd->card->shortname, go->name, sizeof(gosnd->card->driver));
- strncpy(gosnd->card->longname, gosnd->card->shortname,
+ strlcpy(gosnd->card->driver, "go7007", sizeof(gosnd->card->driver));
+ strlcpy(gosnd->card->shortname, go->name, sizeof(gosnd->card->driver));
+ strlcpy(gosnd->card->longname, gosnd->card->shortname,
sizeof(gosnd->card->longname));
gosnd->pcm->private_data = go;