Skip to content

Commit

Permalink
cryptodev: avoid implicit conversion to 64 bit number
Browse files Browse the repository at this point in the history
MSVC issues the warning below:

../lib/cryptodev/rte_cryptodev.c(623): warning C4334: '<<':
    result of 32-bit shift implicitly converted to 64 bits
    (was 64-bit shift intended?)

The code would be better off by using 64 bit numbers to begin with.
That eliminates the need for a conversion to 64 bits later.

Signed-off-by: Andre Muezerie <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
  • Loading branch information
Andre Muezerie authored and Akhil Goyal committed Jan 8, 2025
1 parent 0a14769 commit e666866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cryptodev/rte_cryptodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ rte_cryptodev_asym_xform_capability_check_hash(
{
bool ret = false;

if (capability->hash_algos & (1 << hash))
if (capability->hash_algos & RTE_BIT64(hash))
ret = true;

rte_cryptodev_trace_asym_xform_capability_check_hash(
Expand Down

0 comments on commit e666866

Please sign in to comment.