From be5b08dd6ea6ef0f01caf537bdae125fa66a2230 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Fri, 26 Apr 2024 12:43:44 +0200 Subject: [PATCH] xen-livepatch: fix --force option comparison MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The check for --force option shouldn't be against 0. Reported-by: Jan Beulich Fixes: 62a72092a517 ('livepatch: introduce --force option') Signed-off-by: Roger Pau Monné Acked-by: Anthony PERARD Reviewed-by: Ross Lagerwall --- tools/misc/xen-livepatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/misc/xen-livepatch.c b/tools/misc/xen-livepatch.c index c16fb6862d..f406ea1373 100644 --- a/tools/misc/xen-livepatch.c +++ b/tools/misc/xen-livepatch.c @@ -576,7 +576,7 @@ int main(int argc, char *argv[]) return 0; } - if ( strcmp("--force", argv[1]) ) + if ( !strcmp("--force", argv[1]) ) { if ( argc <= 2 ) { -- 2.39.5