Hi Anthony,

On 11/05/2021 15:58, Anthony PERARD wrote:
On Mon, Apr 05, 2021 at 04:57:04PM +0100, Julien Grall wrote:
From: Julien Grall <jgr...@amazon.com>

literal strings are not meant to be modified. So we should use const
*char rather than char * when we want to store a pointer to them.

Signed-off-by: Julien Grall <jgr...@amazon.com>
---
diff --git a/tools/libs/guest/xg_dom_x86.c b/tools/libs/guest/xg_dom_x86.c
index 2953aeb90b35..e379b07f9945 100644
--- a/tools/libs/guest/xg_dom_x86.c
+++ b/tools/libs/guest/xg_dom_x86.c
@@ -1148,11 +1148,12 @@ static int vcpu_hvm(struct xc_dom_image *dom)
/* ------------------------------------------------------------------------ */ -static int x86_compat(xc_interface *xch, uint32_t domid, char *guest_type)
+static int x86_compat(xc_interface *xch, uint32_t domid,
+                      const char *guest_type)
  {
      static const struct {
-        char           *guest;
-        uint32_t        size;
+        const char      *guest;
+        uint32_t       size;

It seems that one space have been removed by mistake just before "size".

Well spotted. I will fix on commit.


The rest looks good:
Reviewed-by: Anthony PERARD <anthony.per...@citrix.com>

Thank you!

Cheers,

--
Julien Grall

Reply via email to