xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: John Haxby <john.haxby@oracle.com>
To: xen-devel@lists.xensource.com
Subject: Re: libxl: build fix
Date: Tue, 09 Nov 2010 13:27:05 +0000	[thread overview]
Message-ID: <4CD94C29.5010707@oracle.com> (raw)
In-Reply-To: <201011091358.46837.Christoph.Egger@amd.com>

On 09/11/10 12:58, Christoph Egger wrote:
> On Tuesday 09 November 2010 12:54:45 Ian Jackson wrote:
>> Christoph Egger writes ("Re: [Xen-devel] libxl: build fix"):
>>> Attached patch replaces basename with strrchr(3).
>> ...
>>
>>> -        name = basename(filename);
>>> +        name = strrchr(filename, '/');
> Sorry, should be
>
>   name = strrchr(filename, '/') + 1;
>

No, it should be

     name = strrchr(filename, '/');
     if (name)
         name++;
     else
         name = filename;

In fact even that isn't right because basename(3) discards (or at least 
ignores) trailing '/' characters.

jch

  reply	other threads:[~2010-11-09 13:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 15:08 libxl: build fix Christoph Egger
2010-11-08 16:38 ` Ian Jackson
2010-11-08 16:53   ` Christoph Egger
2010-11-08 17:01     ` Ian Jackson
2010-11-09 11:39       ` Christoph Egger
2010-11-09 11:54         ` Ian Jackson
2010-11-09 12:58           ` Christoph Egger
2010-11-09 13:27             ` John Haxby [this message]
2010-11-09 17:03               ` Ian Jackson
  -- strict thread matches above, loose matches on Subject: below --
2010-05-25  9:36 Christoph Egger
2010-05-27 14:41 ` Ian Jackson

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=4CD94C29.5010707@oracle.com \
    --to=john.haxby@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /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).