lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1434558808-16129-4-git-send-email-sergei@s15v.net>
Date:	Wed, 17 Jun 2015 19:33:26 +0300
From:	Sergei Zviagintsev <sergei@...v.net>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Daniel Mack <daniel@...que.org>,
	David Herrmann <dh.herrmann@...glemail.com>,
	Djalal Harouni <tixxdz@...ndz.org>
Cc:	Shuah Khan <shuahkh@....samsung.com>, linux-kernel@...r.kernel.org,
	linux-api@...r.kernel.org, Sergei Zviagintsev <sergei@...v.net>
Subject: [PATCH v2 3/5] selftests/kdbus: remove useless initializations from kdbus_clone_userns_test()

Do not initialize efd, unpriv_conn_id, userns_conn_id and monitor. These
vars are assigned to values later in code while initial values are never
used.

Signed-off-by: Sergei Zviagintsev <sergei@...v.net>
---
 tools/testing/selftests/kdbus/test-metadata-ns.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/kdbus/test-metadata-ns.c b/tools/testing/selftests/kdbus/test-metadata-ns.c
index 2cb1d4d2a5be..ccdfae06922b 100644
--- a/tools/testing/selftests/kdbus/test-metadata-ns.c
+++ b/tools/testing/selftests/kdbus/test-metadata-ns.c
@@ -281,16 +281,13 @@ out:
 static int kdbus_clone_userns_test(const char *bus,
 				   struct kdbus_conn *conn)
 {
-	int ret;
-	int status;
-	int efd = -1;
+	int ret, status, efd;
 	pid_t pid, ppid;
-	uint64_t unpriv_conn_id = 0;
-	uint64_t userns_conn_id = 0;
+	uint64_t unpriv_conn_id, userns_conn_id;
 	struct kdbus_msg *msg;
 	const struct kdbus_item *item;
 	struct kdbus_pids expected_pids;
-	struct kdbus_conn *monitor = NULL;
+	struct kdbus_conn *monitor;
 
 	kdbus_printf("STARTING TEST 'metadata-ns'.\n");
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ