kni: fix possible uninitialized variable
authorThomas Monjalon <thomas@monjalon.net>
Fri, 16 Nov 2018 16:58:51 +0000 (17:58 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Nov 2018 00:43:35 +0000 (01:43 +0100)
commita17842c1421c1b26f9deed4f6684abdba06e7a56
treea93ec038056bce5930e295f09949b852ce121f36
parente357e8ebd99c9c394a276fdffd37f13005cb1c63
kni: fix possible uninitialized variable

This error can be raised:
lib/librte_kni/rte_kni.c:531:15: error:
'req' may be used uninitialized in this function

It should not happen because kni_fifo_get() would return 0 if
req is not initialized, so the function would return before using req.
But GCC complains about it in -O1 optimization,
and a NULL initialization is harmless here.

Fixes: 3fc5ca2f6352 ("kni: initial import")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
lib/librte_kni/rte_kni.c