From: Paul Aitken <paitken@brocade.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] Optimise nfq_queue_cb
Date: Thu, 4 Jun 2015 10:13:01 +0100 [thread overview]
Message-ID: <5570169D.2030708@brocade.com> (raw)
In-Reply-To: <20150601173403.GA25171@salvia>
Pablo, somehow tabs had been converted to spaces.
Let me try again...
P.
On 01/06/15 18:34, Pablo Neira Ayuso wrote:
> On Mon, Jun 01, 2015 at 12:19:20PM +0100, Paul Aitken wrote:
>> Pablo,
>>
>>> On Mon, Jun 01, 2015 at 10:22:00AM +0100, Paul Aitken wrote:
>>>> ct and myct have both already been checked for non-NULL,
>>>> so there's no need to check either of them again later.
>>>>
>>>> Signed-off-by: Paul Aitken <paitken@brocade.com>
>>>> ---
>>>> src/cthelper.c | 8 +++-----
>>>> 1 file changed, 3 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/src/cthelper.c b/src/cthelper.c
>>>> index 15d5126..6537515 100644
>>>> --- a/src/cthelper.c
>>>> +++ b/src/cthelper.c
>>>> @@ -325,14 +325,12 @@ static int nfq_queue_cb(const struct nlmsghdr *nlh, void *data)
>>>> if (pkt_verdict_issue(helper, myct, queue_num, id, verdict, pktb) < 0)
>>>> goto err_pktb;
>>>> - if (ct != NULL)
>>>> - nfct_destroy(ct);
>>>> + nfct_destroy(ct);
>>> void nfct_destroy(struct nf_conntrack *ct)
>>> {
>>> assert(ct != NULL);
>>> ...
>>>
>>> the library doesn't allow NULL pointers.
>> ct was already checked for non-NULL when it was assigned around line 297:
>>
>> ct = nfct_new();
>> if (ct == NULL)
>> goto err;
>>
>> - so ct cannot be NULL at line 325.
> Right, makes sense. However, your patch doesn't apply here for some
> reason:
>
> $ git am Optimise-nfq_queue_cb.patch
> Applying: Optimise nfq_queue_cb
> error: patch failed: src/cthelper.c:325
> error: src/cthelper.c: patch does not apply
> Patch failed at 0001 Optimise nfq_queue_cb
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort"
next prev parent reply other threads:[~2015-06-04 9:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <md5:KJl5IfCAjtPWb+o93HAjWA==>
2015-06-01 9:22 ` [PATCH] Optimise nfq_queue_cb Paul Aitken
2015-06-01 11:03 ` Pablo Neira Ayuso
2015-06-01 11:19 ` Paul Aitken
2015-06-01 17:34 ` Pablo Neira Ayuso
2015-06-04 9:13 ` Paul Aitken [this message]
2015-06-04 9:15 Paul Aitken
2015-06-12 13:08 ` Pablo Neira Ayuso
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=5570169D.2030708@brocade.com \
--to=paitken@brocade.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).