netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 6/6] netfilter: xtables: add const qualifiers
Date: Thu, 11 Feb 2010 17:27:00 +0100	[thread overview]
Message-ID: <4B742FD4.5010801@trash.net> (raw)
In-Reply-To: <alpine.LSU.2.01.1002111717001.11348@obet.zrqbmnf.qr>

Jan Engelhardt wrote:
> On Thursday 2010-02-11 17:06, Patrick McHardy wrote:
> 
>> Jan Engelhardt wrote:
>>> On Thursday 2010-02-11 10:00, Patrick McHardy wrote:
>>>
>>>> Jan Engelhardt wrote:
>>>>> +static inline const struct ip6t_entry_target *
>>>>> +ip6t_get_target_c(const struct ip6t_entry *e)
>>>>> +{
>>>>> +	return ip6t_get_target((struct ip6t_entry *)e);
>>>>> +}
>>>>> +
>>>> I would prefer a macro over these get_target_c functions.
>>> Why so?
>> Because it avoids having a function for const and one for non-const.
> 
> Well, I need two. One that returns const and one that does not;
> ip6t_get_target_c is signaturally-incompatible with ip6t_get_target.

Yes, but you wouldn't if you'd use a macro.

#define ip6t_get_target(e)	((void *)e + e->target_offset)

> FWIW, the function is removed later on anyway ("remove remaining xt1 
> code").

This is patch 6/6, what do you mean with "later"?

  reply	other threads:[~2010-02-11 16:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 17:39 Code cleanups Jan Engelhardt
2010-02-10 17:39 ` [PATCH 1/6] netfilter: iptables: remove unused function arguments Jan Engelhardt
2010-02-10 17:39 ` [PATCH 2/6] netfilter: reduce NF_HOOK by one argument Jan Engelhardt
2010-02-10 17:39 ` [PATCH 3/6] netfilter: get rid of the grossness in netfilter.h Jan Engelhardt
2010-02-10 17:44   ` Patrick McHardy
2010-02-10 21:07     ` Jan Engelhardt
2010-02-11  9:02       ` Patrick McHardy
2010-02-10 17:39 ` [PATCH 4/6] netfilter: xtables: print details on size mismatch Jan Engelhardt
2010-02-10 17:39 ` [PATCH 5/6] netfilter: xtables: constify args in compat copying functions Jan Engelhardt
2010-02-10 17:39 ` [PATCH 6/6] netfilter: xtables: add const qualifiers Jan Engelhardt
2010-02-11  9:00   ` Patrick McHardy
2010-02-11 13:27     ` Jan Engelhardt
2010-02-11 16:06       ` Patrick McHardy
2010-02-11 16:22         ` Jan Engelhardt
2010-02-11 16:27           ` Patrick McHardy [this message]
2010-02-11 17:04             ` Jan Engelhardt
2010-02-10 21:10 ` Code cleanups Jan Engelhardt
2010-02-15 15:34   ` Patrick McHardy
2010-02-15 16:07     ` Jan Engelhardt
2010-02-15 16:23       ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2010-02-11  9:14 [PATCH 6/6] netfilter: xtables: add const qualifiers Alexey Dobriyan
2010-02-11  9:27 ` Patrick McHardy
2010-02-11  9:42   ` Alexey Dobriyan
2010-02-11  9:56     ` Patrick McHardy
2010-02-11 13:12       ` Jan Engelhardt
2009-11-03 18:04 Xtables cleanup patches Jan Engelhardt
2009-11-03 18:04 ` [PATCH 6/6] netfilter: xtables: add const qualifiers Jan Engelhardt

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=4B742FD4.5010801@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    /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).