From: Lidong Zhong <lzhong@suse.com>
To: linux-raid@vger.kernel.org
Subject: [PATCH 2/3] policy.c: make it easily understood when comparing the string
Date: Thu, 27 Aug 2015 15:34:56 +0800 [thread overview]
Message-ID: <1440660897-7619-2-git-send-email-lzhong@suse.com> (raw)
In-Reply-To: <1440660897-7619-1-git-send-email-lzhong@suse.com>
Signed-off-by: Lidong Zhong <lzhong@suse.com>
---
policy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/policy.c b/policy.c
index 064d349..5231ae6 100644
--- a/policy.c
+++ b/policy.c
@@ -253,13 +253,13 @@ static int pol_match(struct rule *rule, char *path, char *type)
int typeok = 0;
while (rule) {
- if (rule->name == rule_path) {
+ if (!strcmp(rule->name, rule_path)) {
if (pathok == 0)
pathok = -1;
if (path && fnmatch(rule->value, path, 0) == 0)
pathok = 1;
}
- if (rule->name == rule_type) {
+ if (!strcmp(rule->name, rule_type)) {
if (typeok == 0)
typeok = -1;
if (type && strcmp(rule->value, type) == 0)
--
1.8.1.4
next prev parent reply other threads:[~2015-08-27 7:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 7:34 [PATCH 1/3] config.c: since dlist is initialized as NULL, remove the useless code Lidong Zhong
2015-08-27 7:34 ` Lidong Zhong [this message]
2015-08-27 7:34 ` [PATCH 3/3] mdadm: remove duplicate logic when c.delay is 0 Lidong Zhong
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=1440660897-7619-2-git-send-email-lzhong@suse.com \
--to=lzhong@suse.com \
--cc=linux-raid@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).