* [PATCH 1/3] config.c: since dlist is initialized as NULL, remove the useless code
@ 2015-08-27 7:34 Lidong Zhong
2015-08-27 7:34 ` [PATCH 2/3] policy.c: make it easily understood when comparing the string Lidong Zhong
2015-08-27 7:34 ` [PATCH 3/3] mdadm: remove duplicate logic when c.delay is 0 Lidong Zhong
0 siblings, 2 replies; 3+ messages in thread
From: Lidong Zhong @ 2015-08-27 7:34 UTC (permalink / raw)
To: linux-raid
Signed-off-by: Lidong Zhong <lzhong@suse.com>
---
config.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/config.c b/config.c
index c58c8fe..bb5af86 100644
--- a/config.c
+++ b/config.c
@@ -941,13 +941,6 @@ struct mddev_dev *conf_get_devs()
static struct mddev_dev *dlist = NULL;
unsigned int i;
- while (dlist) {
- struct mddev_dev *t = dlist;
- dlist = dlist->next;
- free(t->devname);
- free(t);
- }
-
load_conffile();
if (cdevlist == NULL) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] policy.c: make it easily understood when comparing the string
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
2015-08-27 7:34 ` [PATCH 3/3] mdadm: remove duplicate logic when c.delay is 0 Lidong Zhong
1 sibling, 0 replies; 3+ messages in thread
From: Lidong Zhong @ 2015-08-27 7:34 UTC (permalink / raw)
To: linux-raid
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] mdadm: remove duplicate logic when c.delay is 0
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 ` [PATCH 2/3] policy.c: make it easily understood when comparing the string Lidong Zhong
@ 2015-08-27 7:34 ` Lidong Zhong
1 sibling, 0 replies; 3+ messages in thread
From: Lidong Zhong @ 2015-08-27 7:34 UTC (permalink / raw)
To: linux-raid
Signed-off-by: Lidong Zhong <lzhong@suse.com>
---
mdadm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mdadm.c b/mdadm.c
index 5d5a1b8..9d65abb 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1500,8 +1500,6 @@ int main(int argc, char *argv[])
else
c.delay = 60;
}
- if (c.delay == 0)
- c.delay = 60;
rv= Monitor(devlist, mailaddr, program,
&c, daemonise, oneshot,
dosyslog, pidfile, increments,
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-27 7:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/3] policy.c: make it easily understood when comparing the string Lidong Zhong
2015-08-27 7:34 ` [PATCH 3/3] mdadm: remove duplicate logic when c.delay is 0 Lidong Zhong
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).