aboutsummaryrefslogtreecommitdiff
path: root/sound/aoa/codecs/snd-aoa-codec-tas.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-03-27 11:50:19 +0200
committerJaroslav Kysela <perex@suse.cz>2007-05-11 16:55:53 +0200
commit023ff3eee6255390384e050d9daab1490c88edf8 (patch)
tree225e8295feab27f88839d14cb9aeb6ad9cb64e33 /sound/aoa/codecs/snd-aoa-codec-tas.c
parent523f1dce37434a9a6623bf46e7893e2b4b10ac3c (diff)
[ALSA] sound: strlcpy is smart enough
strlcpy already accounts for the trailing zero in its length computation, so there is no need to substract one to the buffer size. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/aoa/codecs/snd-aoa-codec-tas.c')
-rw-r--r--sound/aoa/codecs/snd-aoa-codec-tas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 041fe52cbf2..2f771f57c76 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -899,14 +899,14 @@ static int tas_create(struct i2c_adapter *adapter,
tas->i2c.addr = addr;
/* seems that half is a saner default */
tas->drc_range = TAS3004_DRC_MAX / 2;
- strlcpy(tas->i2c.name, "tas audio codec", I2C_NAME_SIZE-1);
+ strlcpy(tas->i2c.name, "tas audio codec", I2C_NAME_SIZE);
if (i2c_attach_client(&tas->i2c)) {
printk(KERN_ERR PFX "failed to attach to i2c\n");
goto fail;
}
- strlcpy(tas->codec.name, "tas", MAX_CODEC_NAME_LEN-1);
+ strlcpy(tas->codec.name, "tas", MAX_CODEC_NAME_LEN);
tas->codec.owner = THIS_MODULE;
tas->codec.init = tas_init_codec;
tas->codec.exit = tas_exit_codec;