hw/r2d: add comment: this strncpy use is ok

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Jim Meyering 2012-10-04 13:10:02 +02:00 committed by Anthony Liguori
parent 00ea188125
commit 9310b9be14

View File

@ -332,6 +332,8 @@ static void r2d_init(ram_addr_t ram_size,
}
if (kernel_cmdline) {
/* I see no evidence that this .kernel_cmdline buffer requires
NUL-termination, so using strncpy should be ok. */
strncpy(boot_params.kernel_cmdline, kernel_cmdline,
sizeof(boot_params.kernel_cmdline));
}