1 Aug
2008
1 Aug
'08
3:35 p.m.
On Fri, Aug 01, 2008 at 05:23:27PM +0200, Takashi Iwai wrote:
Jon Smirl wrote:
count += codec->display_register(codec, buf + count,
PAGE_SIZE - count, i);
...
count += codec->display_register(codec,
buf + count, PAGE_SIZE - count, i);
Please make it fit in 80 chars like the original code.
This also seems to be an indentation-only change but perhaps I'm missing something here?
- /* Truncate count; min() would cause a warning */
- if (count >= PAGE_SIZE)
count = PAGE_SIZE - 1;
Really safe to remove this?
No. snprintf() returns how many bytes it wanted to write, not the number of bytes it wrote, which means that if the end of the buffer is hit then count will include the overspill and sysfs will complain.