diff mbox series

xen-livepatch: fix --force option comparison

Message ID 20240426072144.48828-1-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show
Series xen-livepatch: fix --force option comparison | expand

Commit Message

Roger Pau Monné April 26, 2024, 7:21 a.m. UTC
The check for --force option shouldn't be against 0.

Reported-by: Jan Beulich <jbeulich@suse.com>
Fixes: 62a72092a517 ('livepatch: introduce --force option')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 tools/misc/xen-livepatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Anthony PERARD April 26, 2024, 8:29 a.m. UTC | #1
On Fri, Apr 26, 2024 at 09:21:44AM +0200, Roger Pau Monne wrote:
> The check for --force option shouldn't be against 0.
> 
> Reported-by: Jan Beulich <jbeulich@suse.com>
> Fixes: 62a72092a517 ('livepatch: introduce --force option')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,
Ross Lagerwall April 26, 2024, 9:42 a.m. UTC | #2
On Fri, Apr 26, 2024 at 8:21 AM Roger Pau Monne <roger.pau@citrix.com> wrote:
>
> The check for --force option shouldn't be against 0.
>
> Reported-by: Jan Beulich <jbeulich@suse.com>
> Fixes: 62a72092a517 ('livepatch: introduce --force option')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
diff mbox series

Patch

diff --git a/tools/misc/xen-livepatch.c b/tools/misc/xen-livepatch.c
index c16fb6862d6c..f406ea1373ae 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 )
         {