On Mon, 29 Oct 2007, Willy Tarreau wrote:
> On Mon, Oct 29, 2007 at 12:46:53AM +0100, Krzysztof Oledzki wrote:>>
>>> OK, but then I'd like to avoid redoing strlen(line) a second time.
>>> We could then have something like this :
>>>
>>> end = line + strlen(line);
>>>
>>> + if ((end-line == sizeof(thisline)-1 && *(end-1) != '\n') {
> > It's not much math on pointers here, because the assignment is done just > on previous line, so it is by definition that end-line == strlen(line). >>>> Would you please assign 'line' inside the loop ? It seems like we could
>>> Also, my initial fgets() in the while() is awful, it hides an assignment.
Done. Sorry it took me so long, last three days were very busy thanks to my employer. ;)
Best regards,
Krzysztof Olędzki Received on 2007/11/01 00:45
This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET