summaryrefslogtreecommitdiffstats
path: root/lib/locking/file_locking.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-05-10 17:49:25 +0000
committerAlasdair Kergon <agk@redhat.com>2006-05-10 17:49:25 +0000
commit2c7fbadeef40b3fc6b8a0f92f3e1b29ff314d34e (patch)
treedd412f84fcaa442c1e5b1f5b327f76465f61d645 /lib/locking/file_locking.c
parenteba586f053161ff799e273d048f8c203e0ff9181 (diff)
downloadlvm2-2c7fbadeef40b3fc6b8a0f92f3e1b29ff314d34e.tar.gz
lvm2-2c7fbadeef40b3fc6b8a0f92f3e1b29ff314d34e.tar.xz
lvm2-2c7fbadeef40b3fc6b8a0f92f3e1b29ff314d34e.zip
more coverity fixes
Diffstat (limited to 'lib/locking/file_locking.c')
-rw-r--r--lib/locking/file_locking.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c
index c2c47ec1..41b90f08 100644
--- a/lib/locking/file_locking.c
+++ b/lib/locking/file_locking.c
@@ -207,9 +207,11 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource,
{
char lockfile[PATH_MAX];
+ assert(resource);
+
switch (flags & LCK_SCOPE_MASK) {
case LCK_VG:
- if (!resource || !*resource)
+ if (!*resource)
lvm_snprintf(lockfile, sizeof(lockfile),
"%s/P_orphans", _lock_dir);
else