git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Josh Triplett <josh@freedesktop.org>,
	Daniel Barkalow <barkalow@iabervon.org>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/5] Make xstrndup common
Date: Tue, 1 May 2007 00:21:50 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0705010020070.29859@racer.site> (raw)
In-Reply-To: <20070430205050.GC4385@coredump.intra.peff.net>

Hi,

On Mon, 30 Apr 2007, Jeff King wrote:

> On Mon, Apr 30, 2007 at 03:12:50PM +0200, Johannes Schindelin wrote:
> 
> > Unless I am missing something, I think this should work:
> > 
> > static inline char *xstrndup(const char *str, int len)
> > {
> > 	char *result = strndup(str, len);
> > 	if (result == NULL)
> > 		die ("xstrndup(): out of memory");
> > 	return result;
> > }
> > 
> > Hmm?
> 
> I can't speak for the original authors, but I imagine part of the
> impetus was that strndup is a GNU-ism.

D'oh! I never thought this was a GNU-ism.

Ciao,
Dscho

  reply	other threads:[~2007-04-30 22:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-28 18:53 [PATCH 1/5] Make xstrndup common Josh Triplett
2007-04-28 22:47 ` Junio C Hamano
2007-04-29 18:19 ` Daniel Barkalow
2007-04-29 20:29   ` Josh Triplett
2007-04-29 20:39     ` Junio C Hamano
2007-04-29 20:40     ` Adam Roben
2007-04-30 13:12     ` Johannes Schindelin
2007-04-30 20:50       ` Jeff King
2007-04-30 22:21         ` Johannes Schindelin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-28 17:05 Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0705010020070.29859@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=josh@freedesktop.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).