Re: [PATCH 1/7] Correct logic in cut_crlf()

2013-02-23 Thread Simon Horman
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

Re: [PATCH 1/7] Correct logic in cut_crlf()

2013-02-19 Thread Krzysztof Olędzki
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()

Re: [PATCH 1/7] Correct logic in cut_crlf()

2013-02-13 Thread Simon Horman
On Tue, Feb 12, 2013 at 04:03:14AM +0100, Krzysztof Olędzki wrote: On 2013-02-12 02:45, Simon Horman wrote: This corrects what appears to be logic errors in cut_crlf(). I assume that the intention of this function is to truncate a string at the first cr or lf. However, currently lf are

[PATCH 1/7] Correct logic in cut_crlf()

2013-02-11 Thread Simon Horman
This corrects what appears to be logic errors in cut_crlf(). I assume that the intention of this function is to truncate a string at the first cr or lf. However, currently lf are ignored. If the current logic is intended then it may be simplified as: while (*s != '\r') { Cc: Krzysztof