Jeff King <p...@peff.net> writes:

> As an aside, I have often been tempted to have xstrdup silently
> propagate a NULL. It would have been the right thing to do here, but
> maybe there are cases where the segfault is preferable for catching a
> mistake early (otherwise you might store the NULL and then segfault much
> later).

Great minds think alike.  The sentence after "but maybe ..." was
what I had in mind as a response in anticipation that somebody might
suggest that; a separate xstrdup_or_null() might be fine, but I'd
rather not to have xstrdup() that is _too_ magical.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to