tools/xenmon: xenbaked: Mark const the field text in stat_map_t
authorJulien Grall <jgrall@amazon.com>
Tue, 18 May 2021 13:51:48 +0000 (14:51 +0100)
committerJulien Grall <jgrall@amazon.com>
Tue, 18 May 2021 13:54:05 +0000 (14:54 +0100)
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@amazon.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
tools/xenmon/xenbaked.c

index d3f940a26bb27599e4c81e20e90526c05573c91f..1ed34334c8247ce326db33874b27f0d6c74378d4 100644 (file)
@@ -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[] = {