http://bugs.winehq.org/show_bug.cgi?id=17195
--- Comment #89 from Daniel Jelinski djelinski1@gmail.com 2012-12-19 02:58:36 CST --- (In reply to comment #88)
Think I've got the first 3 split apart pretty well, any ideas on splitting the last one? I don't know how I would without breaking stuff in between...
Yes, it seems that you can't split this one. You can improve its readability in a different way: - in several places you are checking if the pipe is in message write mode. This check takes a lot of space, so you should probably put it into a function. - could you merge named_pipe_peek_msg with named_pipe_recv_msg? Or at least move common code to a function. This way if something breaks, you will have only one place to fix.
Also, this looks suspicious: + while (!(end->flags & NAMED_PIPE_MESSAGE_STREAM_READ) && + !list_empty( &end->msgs ) && + reply->result < req->length);