Hi Jan,
On 06/04/2021 08:57, Jan Beulich wrote:
On 05.04.2021 17:57, Julien Grall wrote:
From: Julien Grall <jgr...@amazon.com>
The string 'name' will never get modified by the function, so mark it
as const.
Signed-off-by: Julien Grall <jgr...@amazon.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com>
Thanks!
--- 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.
I saw you already sent the patch for that. So I am assuming there is no
action for me here.
Cheers,
--
Julien Grall