reorder: add checks for invalid function inputs
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 10 Apr 2019 11:24:47 +0000 (12:24 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 22 Apr 2019 13:34:30 +0000 (15:34 +0200)
commit18715a0b6f1f7742f21240007f9df501e35aec5e
tree905f7cdeb304545d39e7efa2f2a8730e3f669954
parent914631872c822a440b4d19545d9974481424cd3f
reorder: add checks for invalid function inputs

For APIs which can return an error value, do sanity checking of the input
parameters for NULL and return a suitable error value for those cases.

NOTE: The drain function is currently omitting NULL checks too, but this
function has no way to flag an error value, so checking in that case would
simply mask problems.

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
lib/librte_reorder/rte_reorder.c