Hi,
Manuel Badzong --> dwm (2006-11-26 15:19:58 +0100):
> I tried several inputs (empty lines, lines with multiple '\n', all '\n'
> lines). The following patch would handle all of them correctly. Though
> I 'm not sure if this is really necessary (but it remains one line of
> code).
I'm not sure whether dwm really should try that hard to fix the input
it is given...
However, to continue the tradition of patching the patches patch I've
attached a patch. It
- '\0'-terminates the error message if read() failed (just in case
strlen(strerror(errno)) >= sizeof stext - 1)
- saves 1020 bytes from being zeroed unnecessarily (performance! ;-))
Cheers, Jukka
-- bashian roulette: $ ((RANDOM%6)) || rm -rf ~
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:47 UTC