diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-12-09 22:55:25 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-12-11 23:24:19 +0100 |
commit | b8c729efd094146437c3ed5b336b929608401535 (patch) | |
tree | 0ac1bb8303344e1a81838d3a9ac6d7d19f24eb64 | |
parent | 794093722c657780171486dbfd8cd0ec392e4019 (diff) | |
download | lvm2-b8c729efd094146437c3ed5b336b929608401535.tar.gz |
cov: add internal error for impossible code path
-rw-r--r-- | tools/vgchange.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index 910f33a17..455f688b6 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -533,6 +533,11 @@ static int _vgchange_locktype(struct cmd_context *cmd, struct logical_volume *lv; int lv_lock_count = 0; + if (!lock_type) { + log_error(INTERNAL_ERROR "No locktype_ARG."); + return 0; + } + /* * This is a special/forced exception to change the lock type to none. * It's needed for recovery cases and skips the normal steps of undoing |