[libvirt] [PATCH 1/2] bhyve_parse_command.c: Don't jump onto non-existent label in CONSUME_ARG()

Michal Privoznik posted 2 patches 4 years, 10 months ago
[libvirt] [PATCH 1/2] bhyve_parse_command.c: Don't jump onto non-existent label in CONSUME_ARG()
Posted by Michal Privoznik 4 years, 10 months ago
In v5.10.0-508-gfbf3f3d86a, the 'error' label was removed from
bhyveParseBhyveCommandLine(), however the CONSUME_ARG() macro
still uses it. Fix the macro to return an error instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/bhyve/bhyve_parse_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c
index f7cedf5c65..30927ff10c 100644
--- a/src/bhyve/bhyve_parse_command.c
+++ b/src/bhyve/bhyve_parse_command.c
@@ -628,7 +628,7 @@ bhyveParseBhyvePCIArg(virDomainDefPtr def,
     if ((opti + 1) == argc) { \
         virReportError(VIR_ERR_INVALID_ARG, _("Missing argument for '%s'"), \
                        argv[opti]); \
-        goto error; \
+        return -1; \
     } \
     var = argv[++opti]
 
-- 
2.24.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list