diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2019-06-25 15:08:10 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2019-06-25 17:33:47 +0200 |
commit | 8bea252a636ff0de2266c1ce760b3a6047f0ff2f (patch) | |
tree | 9bdb32db1d0783661a8350dea9e0c6cb628c053e | |
parent | 66665f5e428c2b3d7f4dbcd3e88a872db0381b93 (diff) | |
download | lvm2-8bea252a636ff0de2266c1ce760b3a6047f0ff2f.tar.gz |
cov: clearer condition check
Make the code more obvious.
-rw-r--r-- | lib/activate/activate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/activate/activate.c b/lib/activate/activate.c index b3b8a2534..561a96581 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -2478,7 +2478,12 @@ static int _lv_resume(struct cmd_context *cmd, const char *lvid_s, * If vg_commit() did not happen, lvmcache_get_saved_vg_latest * returns the old metadata which we use to resume LVs. */ - if (!lv && lvid_s) { + if (!lv) { + if (!lvid_s) { + log_error(INTERNAL_ERROR "Requested resume of unindentified resource!"); + return 0; + } + lvid = (const union lvid *) lvid_s; vgid = (const char *)lvid->id[0].uuid; |