aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-05-08 00:25:42 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 11:15:01 -0700
commit880afc4d76af452267174b5989943f081c1db2c0 (patch)
tree87f0638e6a262b89ddde3780f9e66cd0e1fcbc71 /sound
parentepoll: optimizations and cleanups (diff)
downloadlinux-dev-880afc4d76af452267174b5989943f081c1db2c0.tar.xz
linux-dev-880afc4d76af452267174b5989943f081c1db2c0.zip
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')
-rw-r--r--sound/oss/btaudio.c2
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,
if (cmd == SOUND_OLD_MIXER_INFO) {
_old_mixer_info info;
memset(&info,0,sizeof(info));
- strlcpy(info.id,"bt878",sizeof(info.id)-1);
+ strlcpy(info.id, "bt878", sizeof(info.id));
strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name));
if (copy_to_user(argp, &info, sizeof(info)))
return -EFAULT;