Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=023ff3eee6255390384e050d9daab1490c88edf8
Commit:     023ff3eee6255390384e050d9daab1490c88edf8
Parent:     523f1dce37434a9a6623bf46e7893e2b4b10ac3c
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 27 11:50:19 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri May 11 16:55:53 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/aoa/codecs/snd-aoa-codec-onyx.c |    4 ++--
 sound/aoa/codecs/snd-aoa-codec-tas.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/aoa/codecs/snd-aoa-codec-onyx.c 
b/sound/aoa/codecs/snd-aoa-codec-onyx.c
index e91f9f6..ded5167 100644
--- a/sound/aoa/codecs/snd-aoa-codec-onyx.c
+++ b/sound/aoa/codecs/snd-aoa-codec-onyx.c
@@ -1018,7 +1018,7 @@ static int onyx_create(struct i2c_adapter *adapter,
        onyx->i2c.driver = &onyx_driver;
        onyx->i2c.adapter = adapter;
        onyx->i2c.addr = addr & 0x7f;
-       strlcpy(onyx->i2c.name, "onyx audio codec", I2C_NAME_SIZE-1);
+       strlcpy(onyx->i2c.name, "onyx audio codec", I2C_NAME_SIZE);
 
        if (i2c_attach_client(&onyx->i2c)) {
                printk(KERN_ERR PFX "failed to attach to i2c\n");
@@ -1033,7 +1033,7 @@ static int onyx_create(struct i2c_adapter *adapter,
                goto fail;
        }
 
-       strlcpy(onyx->codec.name, "onyx", MAX_CODEC_NAME_LEN-1);
+       strlcpy(onyx->codec.name, "onyx", MAX_CODEC_NAME_LEN);
        onyx->codec.owner = THIS_MODULE;
        onyx->codec.init = onyx_init_codec;
        onyx->codec.exit = onyx_exit_codec;
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c 
b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 041fe52..2f771f5 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to