[systemd-devel] [PATCH 1/4] connection: remove useless kdbus_str_hash() call

Djalal Harouni tixxdz at opendz.org
Sun Mar 30 17:41:23 PDT 2014


The hash is calculated internally in kdbus_name_lookup(), so just
remove this useless kdbus_str_hash() call. It is not used.

Signed-off-by: Djalal Harouni <tixxdz at opendz.org>
---
 connection.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/connection.c b/connection.c
index 753903b..c623720 100644
--- a/connection.c
+++ b/connection.c
@@ -1715,7 +1715,6 @@ int kdbus_cmd_conn_info(struct kdbus_conn *conn,
 	size_t pos;
 	int ret = 0;
 	u64 flags;
-	u32 hash;
 
 	if (cmd_info->id == 0) {
 		if (size == sizeof(struct kdbus_cmd_conn_info)) {
@@ -1729,7 +1728,6 @@ int kdbus_cmd_conn_info(struct kdbus_conn *conn,
 		}
 
 		name = cmd_info->name;
-		hash = kdbus_str_hash(name);
 	} else {
 		mutex_lock(&conn->bus->lock);
 		owner_conn = kdbus_bus_find_conn_by_id(conn->bus, cmd_info->id);
-- 
1.8.5.3



More information about the systemd-devel mailing list