tools/xl: Fix exit code for `xl vkbattach`
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Feb 2021 18:49:23 +0000 (18:49 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 17 Feb 2021 12:37:08 +0000 (12:37 +0000)
commit8e5b2029feee1961d6753127bf249c7a8c8f89a5
treef47039a3c9b2b9890abd4f15356241638c745873
parentd670ef3401b91d04c58d72cd8ce5579b4fa900d8
tools/xl: Fix exit code for `xl vkbattach`

Various version of gcc, when compiling with -Og, complain:

  xl_vkb.c: In function 'main_vkbattach':
  xl_vkb.c:79:12: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     79 |     return rc;
        |            ^~

The dryrun_only path really does leave rc uninitalised.  Introduce a done
label for success paths to use.

Fixes: a15166af7c3 ("xl: add vkb config parser and CLI")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/xl/xl_vkb.c