Re: [PATCH 3/3] x_tables: Factor out 16bit aligment ifname_compare()

From: Joe Perches
Date: Mon Jan 12 2015 - 03:41:04 EST


On Mon, 2015-01-12 at 09:18 +0100, Richard Weinberger wrote:
> Am 12.01.2015 um 03:50 schrieb David Miller:
> > From: Richard Weinberger <richard@xxxxxx>
> > Date: Sun, 11 Jan 2015 22:42:37 +0100
> >
> >> Joe, I really don't care. This is the least significant
> >> patch of the series.
> >> I'll no longer waste my time with that.
> >
> > If you're not willing to fix stylistic issues now, then nobody should
> > bother wasting their time on the high level issues of your patch.
> >
> > Just fix these things now rather than being difficult, this is a part
> > of patch review that everyone has to do, not just you.
>
> I apologize, it was not my intention to be difficult.

No worries.

The unsigned long return is kind of odd with a
compare_<foo> name as those are generally, as Jan
mentioned, signed comparison style return values.

I'd probably use a different function name too

bool ifname_equal(const char *a, const char *b, const char *mask)
{
}

to try to make the return value more obvious too.

> If you and netfilter folks now prefer bool
> for such string compare functions I'll happily address this in
> v2 of my series.

Thanks


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/