mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
rangeset: no need to use snprintf()
As of the conversion to safe_strcpy() years ago there has been no need anymore to use snprintf() to prevent storing a not-nul-terminated string. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
7ee7a3749b
commit
6425fcf371
1 file changed
+1
-8
@@ -436,14 +436,7 @@ struct rangeset *rangeset_new(
|
||||
BUG_ON(flags & ~RANGESETF_prettyprint_hex);
|
||||
r->flags = flags;
|
||||
|
||||
if ( name != NULL )
|
||||
{
|
||||
safe_strcpy(r->name, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(r->name, sizeof(r->name), "(no name)");
|
||||
}
|
||||
safe_strcpy(r->name, name ?: "(no name)");
|
||||
|
||||
if ( (r->domain = d) != NULL )
|
||||
{
|
||||
|
||||