[systemd-devel] [PATCH 3/5] tpmfiles: add missing parenthesis
Michal Sekletar
sekletar.m at gmail.com
Sat Mar 2 06:46:26 PST 2013
On Mar 1, 2013, at 10:35 PM, Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> wrote:
Hi Zbigniew,
> On Fri, Mar 01, 2013 at 06:29:59PM +0100, Lukas Nykryn wrote:
>> ---
>> src/tmpfiles/tmpfiles.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
>> index 6b3f70e..ba22073 100644
>> --- a/src/tmpfiles/tmpfiles.c
>> +++ b/src/tmpfiles/tmpfiles.c
>> @@ -321,7 +321,7 @@ static int dir_cleanup(
>> if (age >= cutoff)
>> continue;
>>
>> - if (!i->type == IGNORE_DIRECTORY_PATH || !streq(dent->d_name, p)) {
>> + if (!(i->type == IGNORE_DIRECTORY_PATH || !streq(dent->d_name, p))) {
> After the change we have:
> if (i->type != I_D_P && streq(d_name, p))
Agreed.
>
> Shouldn't we instead have
> if (i->type != I_D_P || strneq(d_name, p))
> ?
>
I don't think so, because we want to get rid of directory, when item type is different from IGNORE_DIRECTORY_PATH or if we are processing item of type I_D_N, but directory names does not match. I *assume* that original behaviour is actually correct.
> Zbyszek
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Michal
More information about the systemd-devel
mailing list