diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-05-08 03:25:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:01 -0400 |
commit | 880afc4d76af452267174b5989943f081c1db2c0 (patch) | |
tree | 87f0638e6a262b89ddde3780f9e66cd0e1fcbc71 /sound/oss/btaudio.c | |
parent | 6192bd536f96c6a0d969081bc71ae24f9319bfdc (diff) |
oss: 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: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss/btaudio.c')
-rw-r--r-- | sound/oss/btaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index f813ae9c2134..4d5cf05b8922 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c | |||
@@ -344,7 +344,7 @@ static int btaudio_mixer_ioctl(struct inode *inode, struct file *file, | |||
344 | if (cmd == SOUND_OLD_MIXER_INFO) { | 344 | if (cmd == SOUND_OLD_MIXER_INFO) { |
345 | _old_mixer_info info; | 345 | _old_mixer_info info; |
346 | memset(&info,0,sizeof(info)); | 346 | memset(&info,0,sizeof(info)); |
347 | strlcpy(info.id,"bt878",sizeof(info.id)-1); | 347 | strlcpy(info.id, "bt878", sizeof(info.id)); |
348 | strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name)); | 348 | strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name)); |
349 | if (copy_to_user(argp, &info, sizeof(info))) | 349 | if (copy_to_user(argp, &info, sizeof(info))) |
350 | return -EFAULT; | 350 | return -EFAULT; |