On Wed, Feb 20, 2013 at 06:33:08AM +0100, Krzysztof Olędzki wrote: > On 2013-02-13 09:48, Simon Horman wrote: > <CUT> > > >>And add: > >> while (*s == '\r' || *s == '\n') > >>before "*s++ = '\0';" > >> > >>.. so we properly split "line1\r\nline2". > > > >I see cut_crlf used to truncate strings at the end of the first line, > >not split them into multiple lines. So I'm not sure if the while() > >loop you suggest is necessary. Are there cases where it is used to split > >strings into lines? > > Not yet, and actually, a while loop is not correct as we probably do > not want to skip silently empty lines. OK, I do not want to block > you on this important change discussing non-existing usage cases. > > The patch looks good to me. Thanks!
Thanks!