From: Dan Carpenter <error27@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 4/7] selinux: fix error codes in cond_read_node()
Date: Tue, 08 Jun 2010 20:35:21 +0000 [thread overview]
Message-ID: <20100608203521.GC5483@bicker> (raw)
In-Reply-To: <20100607210703.GT5483@bicker>
On Tue, Jun 08, 2010 at 04:19:18PM -0400, Eric Paris wrote:
> > + rc = cond_read_av_list(p, fp, &node->false_list, node->true_list);
> > + if (rc < 0)
> > goto err;
>
> I know that lots of the next_entry() calls use if (rc < 0) [unrelated
> note I think those need to be fixed too] but most of the code uses if
> (rc) and I strongly prefer if (rc) as it's cleaner and faster from a
> micro architecture point of view. Would you mind re-spinning this
> one?
>
> -Eric
The thing I like about if (rc < 0) is that it's makes it explicit that
we expect negative error values. My gut says this will make it easier
for static checkers to track what the value of "rc" is.
But I don't have strong feelings about this.
I'll resend the whole set tomorrow or the next day with all the changes
you suggested.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-06-08 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 21:07 [patch 4/7] selinux: fix error codes in cond_read_node() Dan Carpenter
2010-06-08 20:19 ` Eric Paris
2010-06-08 20:35 ` Dan Carpenter [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=20100608203521.GC5483@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@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