From: "Folkert van Heusden" <folkert@vanheusden.com>
To: "'Ersek Laszlo'" <erseklaszlo@chello.hu>, linux-kernel@vger.kernel.org
Subject: RE: [PATCH] rbtree
Date: Mon, 25 Nov 2002 22:01:37 +0100 [thread overview]
Message-ID: <005501c294c5$d8b1e300$3640a8c0@boemboem> (raw)
In-Reply-To: <Pine.LNX.4.44.0211242332310.90-100000@lacos>
Not trying to be negative and also really wondering this: won't
the compiler produce the same code for:
if (!variable)
and
if (variable == 0)
?
-----Oorspronkelijk bericht-----
Van: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org]Namens Ersek Laszlo
Verzonden: zondag 24 november 2002 23:41
Aan: linux-kernel@vger.kernel.org
Onderwerp: [PATCH] rbtree
Hi all,
this patch tries to remove those checks for 0 from
linux-2.4.19/lib/rbtree.c which are (I think) superfluous.
Laszlo Ersek
--- linux-2.4.19/lib/rbtree.c Sat Aug 3 02:39:46 2002
+++ linux/lib/rbtree.c Sun Nov 24 22:59:38 2002
@@ -159,17 +159,16 @@
if (!other->rb_right ||
other->rb_right->rb_color == RB_BLACK)
{
- register rb_node_t * o_left;
- if ((o_left = other->rb_left))
- o_left->rb_color = RB_BLACK;
+ /* unneeded check-for-0 removed */
+ other->rb_left->rb_color = RB_BLACK;
...
next prev parent reply other threads:[~2002-11-25 20:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200211241225.gAOCP3p05987@Port.imtp.ilyichevsk.odessa.ua>
2002-11-24 22:41 ` Érsek László
2002-11-25 21:01 ` Folkert van Heusden [this message]
2002-11-26 12:13 ` Mike Black
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='005501c294c5$d8b1e300$3640a8c0@boemboem' \
--to=folkert@vanheusden.com \
--cc=erseklaszlo@chello.hu \
--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
all inboxes | Powered by JetHome®