From fdfe80f0242d59bd98bbcc8ec96dbc8742c4e062 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 20 May 2024 14:46:20 +0200 Subject: [PATCH] mirror: drop unneeded call Major,minor,patchlevel are already set from previous call. --- lib/mirror/mirrored.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index cdf7a0d48..80d8ea18f 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -423,8 +423,7 @@ static int _mirrored_target_present(struct cmd_context *cmd, */ /* FIXME Move this into libdevmapper */ - if (target_version(TARGET_NAME_MIRROR, &maj, &min, &patchlevel) && - maj == 1 && + if (maj == 1 && ((min >= 1) || (min == 0 && driver_version(vsn, sizeof(vsn)) && sscanf(vsn, "%u.%u.%u", &maj2, &min2, &patchlevel2) == 3 &&