[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/xenmon: xenbaked: Mark const the field text in stat_map_t



commit 01d84420fb4a9be2ec474a7c1910bb22c28b53c8
Author:     Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Tue May 18 14:51:48 2021 +0100
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Tue May 18 14:54:05 2021 +0100

    tools/xenmon: xenbaked: Mark const the field text in stat_map_t
    
    The field text in stat_map_t will point to string literals. So mark it
    as const to allow the compiler to catch any modified of the string.
    
    Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
    Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/xenmon/xenbaked.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c
index d3f940a26b..1ed34334c8 100644
--- a/tools/xenmon/xenbaked.c
+++ b/tools/xenmon/xenbaked.c
@@ -182,7 +182,7 @@ typedef struct
 {
     int event_count;
     int event_id;
-    char *text;
+    const char *text;
 } stat_map_t;
 
 stat_map_t stat_map[] = {
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.