From: Jonathan Nieder Date: Thu, 05 Apr 2012 22:34:36 GMT Subject: Re: [PATCH] compat/mingw.[ch]: Change return type of exec functions to int Message-ID: <20120405223408.GA13910@burratino> In-Reply-To: <20120405220615.GA11751@sigill.intra.peff.net> Jeff King wrote: > I don't have a strong opinion. The "return 0" is a little misleading, > since it will never be called, but I think we should at least have a > comment like: [...] > --- a/run-command.c > +++ b/run-command.c > @@ -117,8 +117,11 @@ static int exists_in_PATH(const char *file) > > int sane_execvp(const char *file, char * const argv[]) > { > - if (!execvp(file, argv)) > - return 0; > + /* > + * No need to check the return value; if it returns at all, an error > + * occurred. > + */ > + execvp(file, argv); > I'd rather have the "return 0" then. Such a comment that focuses on C library details rather than providing additional information for understanding the sane_execvp function is distracting.