From: Timothy Miller <miller@techsource.com>
To: "翽 Dejean" <TazForEver@free.fr>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kfree calls cleanup
Date: Wed, 02 Jun 2004 14:06:51 -0400 [thread overview]
Message-ID: <40BE173B.7090005@techsource.com> (raw)
In-Reply-To: <1085408263.26813.4.camel@athlon>
Benoît Dejean wrote:
> i've removed some useless test for NULL pointer before kfree calls.
> if(p) kfree(p) -> kfree(p)
> i've also removed variables that have become unused.
> the patch is quite big, but i've check it many times.
This is valid since kfree checks for null pointer, but while the extra
"if (p)" is redundant, if p is most often NULL somewhere, then you can
avoid the function call overhead by this very low-cost check. (Unless
kfree is a macro which includes the check in the macro.)
prev parent reply other threads:[~2004-06-02 17:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-24 14:17 [PATCH] kfree calls cleanup Benoît Dejean
2004-06-02 18:06 ` Timothy Miller [this message]
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=40BE173B.7090005@techsource.com \
--to=miller@techsource.com \
--cc=TazForEver@free.fr \
--cc=linux-kernel@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