On Wed, Mar 05, 2025 at 05:37:15PM +0300, Dan Carpenter wrote: > > if (ret >= 0 && ret < sizeof(*icresp)) > > ret = -ECONNRESET; > > if (ret < 0) { > > ... > > Sure, I can do that. > > I don't love casts either. I normally have tried to write these as > "if (ret < 0 || ret < sizeof(*icresp)) {" and people don't love that. I can see why people don't like it as it's really counterintuitive. These kinds of interfaces just suck given the type promotion rules unfortunately.