libkmod: Fix use of sizeof instead of ARRAY_SIZE

Link: https://github.com/kmod-project/kmod/issues/12
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
Lucas De Marchi 2022-02-23 10:19:13 -08:00
parent 94f7683c5a
commit 571a84c924

View File

@ -578,7 +578,7 @@ KMOD_EXPORT int kmod_module_new_from_lookup(struct kmod_ctx *ctx,
DBG(ctx, "input alias=%s, normalized=%s\n", given_alias, alias);
err = __kmod_module_new_from_lookup(ctx, lookup, sizeof(lookup),
err = __kmod_module_new_from_lookup(ctx, lookup, ARRAY_SIZE(lookup),
alias, list);
DBG(ctx, "lookup=%s found=%d\n", alias, err >= 0 && *list);
@ -635,7 +635,7 @@ KMOD_EXPORT int kmod_module_new_from_name_lookup(struct kmod_ctx *ctx,
DBG(ctx, "input modname=%s, normalized=%s\n", modname, name_norm);
err = __kmod_module_new_from_lookup(ctx, lookup, sizeof(lookup),
err = __kmod_module_new_from_lookup(ctx, lookup, ARRAY_SIZE(lookup),
name_norm, &list);
DBG(ctx, "lookup=%s found=%d\n", name_norm, err >= 0 && list);