net/sfc/base: fix invalid order of memset arguments
authorMartin Harvey <mharvey@solarflare.com>
Mon, 10 Sep 2018 09:33:01 +0000 (10:33 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:02 +0000 (01:41 +0200)
Found by PreFAST.

Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support")
Cc: stable@dpdk.org
Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/ef10_image.c

index 6fb7e47..0d88987 100644 (file)
@@ -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);