public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org, pageexec@freemail.hu
Cc: keyrings@linux-nfs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Keys: Remove incorrect and obsolete '!' operators
Date: Tue, 01 Nov 2005 14:16:39 +0000	[thread overview]
Message-ID: <23655.1130854599@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <11615.1128694058@warthog.cambridge.redhat.com>


The attached patch removes a couple of incorrect and obsolete '!' operators
left over from the conversion of the key permission functions from true/false
returns to zero/error returns.

Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 keys-debang-2614rc5mm1.diff
 security/keys/keyring.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -uNrp linux-2.6.14-rc5-mm1/security/keys/keyring.c linux-2.6.14-rc5-mm1-keys/security/keys/keyring.c
--- linux-2.6.14-rc5-mm1/security/keys/keyring.c	2005-11-01 13:22:53.000000000 +0000
+++ linux-2.6.14-rc5-mm1-keys/security/keys/keyring.c	2005-11-01 13:40:52.000000000 +0000
@@ -434,8 +434,8 @@ ascend:
 		if (sp >= KEYRING_SEARCH_MAX_DEPTH)
 			continue;
 
-		if (!key_task_permission(make_key_ref(key, possessed),
-					 context, KEY_SEARCH) < 0)
+		if (key_task_permission(make_key_ref(key, possessed),
+					context, KEY_SEARCH) < 0)
 			continue;
 
 		/* stack the current position */
@@ -621,8 +621,8 @@ struct key *find_keyring_by_name(const c
 			if (strcmp(keyring->description, name) != 0)
 				continue;
 
-			if (!key_permission(make_key_ref(keyring, 0),
-					    KEY_SEARCH) < 0)
+			if (key_permission(make_key_ref(keyring, 0),
+					   KEY_SEARCH) < 0)
 				continue;
 
 			/* found a potential candidate, but we still need to

      parent reply	other threads:[~2005-11-01 14:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07 14:07 [PATCH] Keys: Split key permissions checking into a .c file David Howells
2005-10-07 15:41 ` [PATCH] Keys: Possessor permissions should be additive David Howells
2005-10-07 15:57   ` [PATCH] Keys: Add LSM hooks for key management [try #2] David Howells
2005-10-07 16:08     ` [PATCH] Keys: Remove key duplication David Howells
2005-10-07 22:04     ` [Keyrings] [PATCH] Keys: Add LSM hooks for key management [try #2] Chris Wright
2005-10-07 23:34       ` David Howells
2005-10-07 23:35         ` Chris Wright
2005-10-07 23:38           ` David Howells
2005-10-07 23:45             ` David Howells
2005-10-07 23:46               ` Chris Wright
2005-10-07 23:46             ` Chris Wright
2005-10-08  6:51   ` [PATCH] Keys: Add LSM hooks for key management [try #3] Chris Wright
2005-11-01 14:16 ` David Howells [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=23655.1130854599@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=keyrings@linux-nfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pageexec@freemail.hu \
    --cc=torvalds@osdl.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