diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-02-27 14:43:36 -0800 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-02-27 14:43:36 -0800 |
commit | 1ceb83d7ab23736ad0deb2d794615423af55322a (patch) | |
tree | b1001d67cbf4737b41a7be0592595ab05b2578d1 /linux/drivers/media/dvb/frontends/dvb-pll.c | |
parent | cecfcf9f183eeb4c8c3198a23901c8cb27eeacc6 (diff) | |
download | mediapointer-dvb-s2-1ceb83d7ab23736ad0deb2d794615423af55322a.tar.gz mediapointer-dvb-s2-1ceb83d7ab23736ad0deb2d794615423af55322a.tar.bz2 |
dvb-pll: Use sizeof() to get name length
From: Trent Piepho <xyzzy@speakeasy.org>
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>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/dvb-pll.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/dvb-pll.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.c b/linux/drivers/media/dvb/frontends/dvb-pll.c index 62de760c8..43084bfc0 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.c +++ b/linux/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; |