From: Julien Ramseier <j.ramseier@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH] glob: fix / matching
Date: Sun, 28 May 2017 17:06:45 +0200 [thread overview]
Message-ID: <CE23B1E4-CE43-43D9-B8B6-E3876267DE42@gmail.com> (raw)
In-Reply-To: <20170528025520.GF1627@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 663 bytes --]
> Le 28 mai 2017 à 04:55, Rich Felker <dalias@libc.org> a écrit :
>>
>> I'm confused how this patch differs from just removing the "if (*p)"
>> condition before calling match_in_dir. Does match_in_dir actually work
>> if p points to an empty string? I thought not...
>
> Hmm, just removing the "if (*p)" seems to make it work; it looks like
> match_in_dir covers this case fine. I'd like a second opinion on
> whether this looks okay since I haven't touched this code in years,
> but I suspect it'll turn out to be an okay fix for now...
>
The "if (*p)" is needed, otherwise match_in_dir will append an empty
match when p = "".
- Julien
[-- Attachment #2: Type: text/html, Size: 4537 bytes --]
next prev parent reply other threads:[~2017-05-28 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 14:59 Julien Ramseier
2017-05-28 1:59 ` Rich Felker
2017-05-28 2:55 ` Rich Felker
2017-05-28 15:06 ` Julien Ramseier [this message]
2017-06-01 2:00 ` Rich Felker
2017-06-03 16:15 ` Julien Ramseier
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=CE23B1E4-CE43-43D9-B8B6-E3876267DE42@gmail.com \
--to=j.ramseier@gmail.com \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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).