[dpdk-dev] [PATCH] hash: fix possible uninitialized variable
stephen at networkplumber.org
Sun Dec 23 08:43:50 CET 2018
On Sat, 22 Dec 2018 04:10:59 -0800
Haiyang Tan <haiyangtan at tencent.com> wrote:
> The uninitialized field 'extra_flag' of hash_cuckoo_params may enable
> certain feature silently. Typically, if bit0 of 'extra_flag' set, the
> hardware transactional memory support will be enabled unexpectedly.
> Signed-off-by: Haiyang Tan <haiyangtan at tencent.com>
This is not necessary. Structure initializations will fill in the other
elements with zero.
Omitted field members are implicitly initialized the same as objects that have static storage duration.
More information about the dev