summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/dvb-pll.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-04-27 12:31:27 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 15:44:00 -0300
commit982dd1bdaab39185ccd55cafd3c099b7fee5f2dd (patch)
tree6980569b48a7fe9ecd1c91c952556bdf6acea664 /drivers/media/dvb/frontends/dvb-pll.c
parent51dec1f1abef9771d9085c2336234b28b3e78821 (diff)
V4L/DVB (5360): Dvb-pll: Use sizeof() to get name length
Better to use sizeof() to get the size of the output buffer for the tuner name, instead of just hard coding 128. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/dvb-pll.c')
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index 62de760c844f..43084bfc0f18 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -640,7 +640,8 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops,
sizeof(struct dvb_tuner_ops));
- strncpy(fe->ops.tuner_ops.info.name, desc->name, 128);
+ strncpy(fe->ops.tuner_ops.info.name, desc->name,
+ sizeof(fe->ops.tuner_ops.info.name));
fe->ops.tuner_ops.info.frequency_min = desc->min;
fe->ops.tuner_ops.info.frequency_min = desc->max;