From: Linus Torvalds Date: Wed, 27 Jun 2007 16:49:39 GMT Subject: Re: [PATCH] git-log: detect dup and fdopen failure Message-ID: In-Reply-To: <87odj1mpy2.fsf@rho.meyering.net> On Wed, 27 Jun 2007, Jim Meyering wrote: > > Subject: [PATCH] git-log: detect dup and fdopen failure > git-compat-util.h (xdup, xfdopen): Define functions. > > Signed-off-by: Jim Meyering Acked-by: Linus Torvalds That said, the whole "prepend 'x' to the function name" thing is obviously how git does things, but maybe it would be more readable in the long term to make the prefix be 'safe_' instead of 'x', or something like that? The 'x' thing is the fairly traditional thing to do for malloc(), and that's where it comes from, of course. In git (and other places: google code shows that other projects have ended up with the same kind of things, with busybox being one example I found), it then got extended to xread/xwrite, but now it's getting extended so much that I'd worry a bit that in the long run the easy-to-miss 'x' part really would be better off written out a bit more. No really strong opinion, just throwing it out for comment. It was brought on by the fact that I mentally parsed "xfdopen()" as "xf" + "dopen" for some reason (but maybe that's just me). Linus