net/sfc/base: fix warnings from VS2015 C compiler (C4310)

Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.

Fixes: 354df7eadf ("net/sfc/base: import bootrom configuration")
Cc: stable@dpdk.org

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Andrew Lee 2017-11-16 08:04:31 +00:00 committed by Ferruh Yigit
parent 5e6602ecdb
commit e6df11c856

View File

@ -356,7 +356,7 @@ efx_bootcfg_read(
rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length,
&used_bytes);
if (rc != 0 || used_bytes == 0) {
payload[0] = (uint8_t)~DHCP_END;
payload[0] = (uint8_t)(~DHCP_END & 0xff);
payload[1] = DHCP_END;
used_bytes = 2;
}