On 1/11/21 6:09 PM, Miroslav Rezanina wrote:
> When using strncpy with lenght equal to size of target array,

Typo "length".

> GCC 11 produce following warning:
> 
>    warning: '__builtin_strncpy' specified bound 256 equals destination size 
> [-Wstringop-truncation]
> 
> To prevent this warning, use strpadcpy function that will enusure that
> provide functionality similar to strncpy but allow copy strings with
> length equal size of target array (and discarding endint zero) and
> ensure array is zeroed after copied string.

Hard to understand... Look like incorrect copy/paste in the middle?

> Signed-off-by: Miroslav Rezanina <mreza...@redhat.com>
> ---
>  target/s390x/kvm.c         | 12 +++++-------
>  target/s390x/misc_helper.c |  7 +++++--
>  2 files changed, 10 insertions(+), 9 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>


Reply via email to