]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: fix typo in mnt_context_prepare_helper() [lgtm scan]
authorKarel Zak <kzak@redhat.com>
Tue, 3 Dec 2019 13:31:55 +0000 (14:31 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Dec 2019 13:31:55 +0000 (14:31 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c

index 977842f7d89af6fd1e406caed503ba58cd12eb2f..bfba39c4bdcfa92d04fd41a50172d2c5641f85af 100644 (file)
@@ -2094,7 +2094,7 @@ int mnt_context_prepare_helper(struct libmnt_context *cxt, const char *name,
                        continue;
 
                xrc = stat(helper, &st);
-               if (rc == -1 && errno == ENOENT && strchr(type, '.')) {
+               if (xrc == -1 && errno == ENOENT && strchr(type, '.')) {
                        /* If type ends with ".subtype" try without it */
                        char *hs = strrchr(helper, '.');
                        if (hs)