diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-10-18 11:18:02 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-11-11 16:52:24 +0100 |
commit | e54cce245f2829107e1ed09221bca7ff7921d98b (patch) | |
tree | 028c2e97e1fc60b956160812d679c89995f9140a | |
parent | 59b29716e5fd0f490d28d2457cdebfc68eb9940e (diff) | |
download | lvm2-e54cce245f2829107e1ed09221bca7ff7921d98b.tar.gz |
cleanup: skip checking for just assigned string
When 'stripe_filler' has been just set to 'error',
do not check it again for not being 'error'.
-rw-r--r-- | lib/commands/toolcontext.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index c416575aa..002af05e7 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -640,8 +640,7 @@ static int _process_config(struct cmd_context *cmd) if (!strcmp(cmd->stripe_filler, "/dev/ioerror") && stat(cmd->stripe_filler, &st)) cmd->stripe_filler = "error"; - - if (strcmp(cmd->stripe_filler, "error")) { + else if (strcmp(cmd->stripe_filler, "error")) { if (stat(cmd->stripe_filler, &st)) { log_warn("WARNING: activation/missing_stripe_filler = \"%s\" " "is invalid,", cmd->stripe_filler); |