summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2016-10-18 11:18:02 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2016-11-11 16:52:24 +0100
commite54cce245f2829107e1ed09221bca7ff7921d98b (patch)
tree028c2e97e1fc60b956160812d679c89995f9140a
parent59b29716e5fd0f490d28d2457cdebfc68eb9940e (diff)
downloadlvm2-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.c3
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);