]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Add helper function to iterate lookup options
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 16 Feb 2022 03:12:05 +0000 (19:12 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 21 Feb 2022 04:58:11 +0000 (20:58 -0800)
commit82972710196442c503cc1068a05651c354a865fb
tree50782a5205e460843762a6c05bbfffc9f8d3846d
parent61a93a043aa52ad62a11ba940d4ba93cb3254e78
libkmod: Add helper function to iterate lookup options

The CHECK_ERR_AND_FINISH macro with conditional code flow changes has
been a source of bugs. Get rid of it replacing with a helper function
to iterate an array of lookup functions. This helper may also be useful
in future to create different lookup APIs in libkmod.

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
libkmod/libkmod-module.c