Re: [PATCH] git-log: detect dup and fdopen failure
- From
Josh Triplett <josh@freedesktop.org>
- Date
- Jun 28, 2007, 02:46 UTC
- Message-ID
- <4683211E.2010704@freedesktop.org>
- In-Reply-To
- <alpine.LFD.0.98.0706270935340.8675@woody.linux-foundation.org>
Linus Torvalds wrote:
Show 11 quoted lines
> 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 <jim@meyering.net> > > Acked-by: Linus Torvalds <torvalds@linux-foundation.org> > > 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?
If you want a more verbose name than xfoo, I personally like the foo_or_die convention, which reminds you explicitly that the function might kill the program. safe_ might convey exactly the opposite impression.
- Josh Triplett