aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/debug.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-11-23 01:34:50 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-24 07:28:16 -0500
commit50553c2c8145c3278668f385a71abbf79108e737 (patch)
tree2b150b4a825d85a6489976f8aa1044723ede5cca /drivers/net/wireless/ath/ath6kl/debug.c
parentfdb28589b10f1bd4c407ea304399c2ff1cae1504 (diff)
ath6kl: use a larger buffer for debug output
The return value of snprintf() is the number of bytes which would have been copied if there was enough space, but we want the number of bytes actually copied. The scnprintf() function does this. Also in theory, a %u can take take 10 digits so we may as well make the buffer larger as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 370664a7a37b..cf513a80b061 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1550,10 +1550,10 @@ static ssize_t ath6kl_listen_int_read(struct file *file,
1550 size_t count, loff_t *ppos) 1550 size_t count, loff_t *ppos)
1551{ 1551{
1552 struct ath6kl *ar = file->private_data; 1552 struct ath6kl *ar = file->private_data;
1553 char buf[16]; 1553 char buf[32];
1554 int len; 1554 int len;
1555 1555
1556 len = snprintf(buf, sizeof(buf), "%u %u\n", ar->listen_intvl_t, 1556 len = scnprintf(buf, sizeof(buf), "%u %u\n", ar->listen_intvl_t,
1557 ar->listen_intvl_b); 1557 ar->listen_intvl_b);
1558 1558
1559 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 1559 return simple_read_from_buffer(user_buf, count, ppos, buf, len);