From 9b379c4a3affa5477e68135b6738cd5b7c80b865 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 8 Jan 2015 16:45:10 +0100 Subject: [PATCH] connection: remove redundant variable 'allowed' is equivalent to '!!r' so drop it. Signed-off-by: David Herrmann --- connection.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/connection.c b/connection.c index aa9d255..4c7d3de 100644 --- a/connection.c +++ b/connection.c @@ -242,7 +242,6 @@ static int kdbus_conn_check_access(struct kdbus_conn *conn_src, */ if (reply_wake && msg->cookie_reply > 0) { struct kdbus_reply *r; - bool allowed = false; /* * The connection that we are replying to has not @@ -261,12 +260,10 @@ static int kdbus_conn_check_access(struct kdbus_conn *conn_src, *reply_wake = kdbus_reply_ref(r); else kdbus_reply_unref(r); - - allowed = true; } mutex_unlock(&conn_dst->lock); - return allowed ? 0 : -EPERM; + return r ? 0 : -EPERM; } /* ... otherwise, ask the policy DBs for permission */ -- 2.34.1