]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: assert() is enough [lgtm scan]
authorKarel Zak <kzak@redhat.com>
Mon, 2 Aug 2021 08:58:56 +0000 (10:58 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Aug 2021 08:58:56 +0000 (10:58 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/lock.c

index fac64b63b7b8c316a47e65fdbecd2fe6088cad96..f730af18c76fc5039f0c513c33565759c9c4d1db 100644 (file)
@@ -148,9 +148,6 @@ int mnt_lock_use_simplelock(struct libmnt_lock *ml, int enable)
        sz = strlen(ml->lockfile);
        assert(sz);
 
-       if (sz < 1)
-               return -EINVAL;
-
        /* Change lock name:
         *
         *      flock:     "<name>.lock"