[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b10e32175e6bb36911f33b80f0dbb912716ddcb0.1444302968.git.sergei@s15v.net>
Date: Thu, 8 Oct 2015 14:31:40 +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: linux-kernel@...r.kernel.org, Sergei Zviagintsev <sergei@...v.net>
Subject: [PATCH 11/44] kdbus: Cosmetic fix of kdbus_name_is_valid()
Initialize `dot' during declaration but not in the for-loop, as it is
not used as a loop cursor.
Signed-off-by: Sergei Zviagintsev <sergei@...v.net>
---
ipc/kdbus/names.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
index 6b31b38ac2ad..4dea83defc8e 100644
--- a/ipc/kdbus/names.c
+++ b/ipc/kdbus/names.c
@@ -530,10 +530,10 @@ void kdbus_name_release_all(struct kdbus_name_registry *reg,
*/
bool kdbus_name_is_valid(const char *p, bool allow_wildcard)
{
- bool dot, found_dot = false;
+ bool dot = true, found_dot = false;
const char *q;
- for (dot = true, q = p; *q; q++) {
+ for (q = p; *q; q++) {
if (*q == '.') {
if (dot)
return false;
--
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