From: Junio C Hamano Date: Fri, 27 Jun 2025 23:53:47 GMT Subject: Re: [PATCH v2] daemon: correctly handle soft accept() errors in service_loop Message-ID: In-Reply-To: Carlo Marcelo Arenas Belón writes: >> socklen_t sslen = sizeof(ss); >> - int incoming = accept(pfd[i].fd, &ss.sa, &sslen); >> + int incoming; >> + int retry = 3; >> + >> + incoming = accept(pfd[i].fd, &ss.sa, &sslen); >> if (incoming < 0) { >> ... > > That seems unnecessarily restrictive just to minimize churn and leaves the > deflaration of incoming strangely sitting in between two assignments, which > while it doesn't trigger -Wdeclaration-after-statement seems to go against > its spirit. Hmph, I am not Phillip, but my take on it is that incoming and retry are fairly closely related variables in this loop, and better grouped together? I also find it a bit ugly to hardcode "3" here like this, but perhaps I am overthinking about it.