From 6f7c67a5ffd7d356b3c91e4bbc8e1653cfc89ec4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 3 Dec 2019 14:31:55 +0100 Subject: [PATCH] libmount: fix typo in mnt_context_prepare_helper() [lgtm scan] Signed-off-by: Karel Zak --- libmount/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmount/src/context.c b/libmount/src/context.c index 977842f7d8..bfba39c4bd 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -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) -- 2.47.2