From b8c729efd094146437c3ed5b336b929608401535 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 9 Dec 2016 22:55:25 +0100 Subject: [PATCH] cov: add internal error for impossible code path --- tools/vgchange.c | 5 +++++ 1 file changed, 5 insertions(+) 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