summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-11-14 12:31:28 -0600
committerDavid Teigland <teigland@redhat.com>2019-11-27 11:13:32 -0600
commit657d42e87953adcecc37701ee4e04287c30eec96 (patch)
tree99c27e8db738a1efa7b435113385cec83499774c
parent595aa1d4526185e0fe52430ce019a07103014b0c (diff)
downloadlvm2-657d42e87953adcecc37701ee4e04287c30eec96.tar.gz
Revert "cov: avoid passing NULL to strstr function"
This reverts commit 0bad3977df40a70c68778ff0514d0ca712fee402. fixes folded into subsequent pvck commit
-rw-r--r--tools/pvck.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/pvck.c b/tools/pvck.c
index 9f030c166..90bcafeb8 100644
--- a/tools/pvck.c
+++ b/tools/pvck.c
@@ -417,11 +417,11 @@ static int _dump_all_text(struct cmd_context *cmd, const char *tofile, struct de
memset(line, 0, sizeof(line));
_copy_line(str1, line, &len);
log_print("%s", line);
- if ((str2 = strstr(str1, "creation_time = "))) {
- memset(line, 0, sizeof(line));
- _copy_line(str2, line, &len);
- log_print("%s\n", line);
- }
+ }
+ if ((str2 = strstr(str1, "creation_time = "))) {
+ memset(line, 0, sizeof(line));
+ _copy_line(str2, line, &len);
+ log_print("%s\n", line);
}
}