From: Martin Harvey Date: Mon, 10 Sep 2018 09:33:01 +0000 (+0100) Subject: net/sfc/base: fix invalid order of memset arguments X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b1c25748ddf5dcec834eed4d1e97068ebe5e2409;p=dpdk.git net/sfc/base: fix invalid order of memset arguments Found by PreFAST. Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support") Cc: stable@dpdk.org Signed-off-by: Martin Harvey Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/base/ef10_image.c b/drivers/net/sfc/base/ef10_image.c index 6fb7e47644..0d88987627 100644 --- a/drivers/net/sfc/base/ef10_image.c +++ b/drivers/net/sfc/base/ef10_image.c @@ -704,7 +704,7 @@ efx_build_signed_image_write_buffer( * results in the layout used for the data chunks and chunk headers. */ /* END CSTYLED */ - memset(bufferp, buffer_size, 0xFF); + memset(bufferp, 0xFF, buffer_size); EFX_STATIC_ASSERT(sizeof (chunk_hdr) == SIGNED_IMAGE_CHUNK_HDR_LEN); memset(&chunk_hdr, 0, SIGNED_IMAGE_CHUNK_HDR_LEN);