[libvirt] [PATCH 01/12] libxl: do not use G_REGEX_EXTENDED

Ján Tomko posted 12 patches 6 years, 2 months ago
[libvirt] [PATCH 01/12] libxl: do not use G_REGEX_EXTENDED
Posted by Ján Tomko 6 years, 2 months ago
This flag is not needed to use extended regular expression syntax
with GRegex and it makes GRegex ignore whitespace in the regex.

Remove the unintended usage, even though it should not matter in this
case.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/libxl/libxl_capabilities.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index fe792e9a82..0fb9c0b344 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -397,7 +397,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps)
         return -1;
     }
 
-    regex = g_regex_new(XEN_CAP_REGEX, G_REGEX_EXTENDED, 0, &err);
+    regex = g_regex_new(XEN_CAP_REGEX, 0, 0, &err);
     if (!regex) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Failed to compile regex %s"), err->message);
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 01/12] libxl: do not use G_REGEX_EXTENDED
Posted by Peter Krempa 6 years, 2 months ago
On Wed, Nov 13, 2019 at 16:48:42 +0100, Ján Tomko wrote:
> This flag is not needed to use extended regular expression syntax
> with GRegex and it makes GRegex ignore whitespace in the regex.
> 
> Remove the unintended usage, even though it should not matter in this
> case.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  src/libxl/libxl_capabilities.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>

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