[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 01/14] xen: Constify the second parameter of rangeset_new()
On 05.04.2021 17:57, Julien Grall wrote: > From: Julien Grall <jgrall@xxxxxxxxxx> > > The string 'name' will never get modified by the function, so mark it > as const. > > Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > --- a/xen/common/rangeset.c > +++ b/xen/common/rangeset.c > @@ -421,7 +421,7 @@ bool_t rangeset_is_empty( > } > > struct rangeset *rangeset_new( > - struct domain *d, char *name, unsigned int flags) > + struct domain *d, const char *name, unsigned int flags) > { > struct rangeset *r; Remotely along these lines the function also has no need anymore to use snprintf() - safe_strcpy() very well fits both purposes. But quite likely for another patch. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |