Message ID | 20210405155713.29754-14-julien@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Use const whether we point to literal strings (take 1) | expand |
On Mon, Apr 05, 2021 at 04:57:12PM +0100, Julien Grall wrote: > From: Julien Grall <jgrall@amazon.com> > > 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> Thanks,
diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index d3f940a26bb2..1ed34334c824 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[] = {