[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Line.LNX.4.64.0703261612370.14914@d.namei>
Date: Mon, 26 Mar 2007 16:14:59 -0400 (EDT)
From: James Morris <jmorris@...ei.org>
To: Joy Latten <latten@...tin.ibm.com>
cc: netdev@...r.kernel.org, davem@...emloft.net, eparis@...hat.com,
selinux@...ho.nsa.gov
Subject: Re: [PATCH]: Add security check before flushing SAD/SPD
On Mon, 26 Mar 2007, James Morris wrote:
> On Mon, 26 Mar 2007, Joy Latten wrote:
>
> > Signed-off-by: Joy Latten<latten@...tin.ibm.com>
>
> This looks ok to me, although I have a couple of minor issues (which
> should probably not stop it being merged):
>
> > + if ((err = security_xfrm_policy_delete(pol)) != 0) {
>
> The value of 'err' is implicitly inverted several times in this function
> (and similarly in the state flush one). Something like
>
> ret = (fn() != 0);
Oops, ignore the above.
The correct idiom is:
err = fn();
if (err) {
/* handle error */
}
Please use that, to reduce confusion :-)
- James
--
James Morris
<jmorris@...ei.org>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists