From: Sergei Zviagintsev <sergei-E844GTqJAzo@public.gmane.org>
To: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>,
David Herrmann
<dh.herrmann-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
Djalal Harouni <tixxdz-Umm1ozX2/EEdnm+yROfE0A@public.gmane.org>
Cc: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Sergei Zviagintsev <sergei-E844GTqJAzo@public.gmane.org>
Subject: [PATCH v2 3/5] selftests/kdbus: remove useless initializations from kdbus_clone_userns_test()
Date: Wed, 17 Jun 2015 19:33:26 +0300 [thread overview]
Message-ID: <1434558808-16129-4-git-send-email-sergei@s15v.net> (raw)
In-Reply-To: <1434558808-16129-1-git-send-email-sergei-E844GTqJAzo@public.gmane.org>
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-E844GTqJAzo@public.gmane.org>
---
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
next prev parent reply other threads:[~2015-06-17 16:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 16:33 [PATCH v2 0/5] selftests/kdbus: small fixes Sergei Zviagintsev
2015-06-17 16:33 ` [PATCH v2 1/5] selftests/kdbus: handle cap_get_proc() error properly Sergei Zviagintsev
[not found] ` <1434558808-16129-1-git-send-email-sergei-E844GTqJAzo@public.gmane.org>
2015-06-17 16:33 ` [PATCH v2 2/5] selftests/kdbus: drop useless assignment Sergei Zviagintsev
2015-06-17 16:33 ` Sergei Zviagintsev [this message]
2015-06-17 17:07 ` [PATCH v2 0/5] selftests/kdbus: small fixes Shuah Khan
[not found] ` <5581A962.3040601-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2015-06-17 19:11 ` Greg Kroah-Hartman
[not found] ` <20150617191130.GB3186-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-06-18 10:05 ` David Herrmann
2015-06-19 4:27 ` Greg Kroah-Hartman
2015-06-17 16:33 ` [PATCH v2 4/5] selftests/kdbus: drop duplicated code from __kdbus_msg_send() Sergei Zviagintsev
2015-06-17 16:33 ` [PATCH v2 5/5] selftests/kdbus: fix error paths in __kdbus_msg_send() Sergei Zviagintsev
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=1434558808-16129-4-git-send-email-sergei@s15v.net \
--to=sergei-e844gtqjazo@public.gmane.org \
--cc=daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org \
--cc=dh.herrmann-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
--cc=tixxdz-Umm1ozX2/EEdnm+yROfE0A@public.gmane.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