aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-common.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-17 09:26:59 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:22 -0400
commitb634a93f783dbd4be31f3cc9b2292eddfb496d10 (patch)
treed60edacfdd3c54269b780f901da33ff30e797f78 /drivers/media/video/v4l2-common.c
parente32a7eccd7f016928dd864711ac654e6db62c5f3 (diff)
V4L/DVB (10244): v4l2: replace a few snprintfs with strlcpy
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r--drivers/media/video/v4l2-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index b8f2be8d5c0..0f450a73477 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -555,7 +555,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
555 qctrl->step = step; 555 qctrl->step = step;
556 qctrl->default_value = def; 556 qctrl->default_value = def;
557 qctrl->reserved[0] = qctrl->reserved[1] = 0; 557 qctrl->reserved[0] = qctrl->reserved[1] = 0;
558 snprintf(qctrl->name, sizeof(qctrl->name), name); 558 strlcpy(qctrl->name, name, sizeof(qctrl->name));
559 return 0; 559 return 0;
560} 560}
561EXPORT_SYMBOL(v4l2_ctrl_query_fill); 561EXPORT_SYMBOL(v4l2_ctrl_query_fill);
@@ -720,7 +720,7 @@ int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qc
720 for (i = 0; i < qmenu->index && menu_items[i]; i++) ; 720 for (i = 0; i < qmenu->index && menu_items[i]; i++) ;
721 if (menu_items[i] == NULL || menu_items[i][0] == '\0') 721 if (menu_items[i] == NULL || menu_items[i][0] == '\0')
722 return -EINVAL; 722 return -EINVAL;
723 snprintf(qmenu->name, sizeof(qmenu->name), menu_items[qmenu->index]); 723 strlcpy(qmenu->name, menu_items[qmenu->index], sizeof(qmenu->name));
724 return 0; 724 return 0;
725} 725}
726EXPORT_SYMBOL(v4l2_ctrl_query_menu); 726EXPORT_SYMBOL(v4l2_ctrl_query_menu);
@@ -737,8 +737,8 @@ int v4l2_ctrl_query_menu_valid_items(struct v4l2_querymenu *qmenu, const u32 *id
737 return -EINVAL; 737 return -EINVAL;
738 while (*ids != V4L2_CTRL_MENU_IDS_END) { 738 while (*ids != V4L2_CTRL_MENU_IDS_END) {
739 if (*ids++ == qmenu->index) { 739 if (*ids++ == qmenu->index) {
740 snprintf(qmenu->name, sizeof(qmenu->name), 740 strlcpy(qmenu->name, menu_items[qmenu->index],
741 menu_items[qmenu->index]); 741 sizeof(qmenu->name));
742 return 0; 742 return 0;
743 } 743 }
744 } 744 }