libkmod: use strlen() for string literals
Older compilers had struggles expanding strlen(string-literal) to a
constant compile time expression. Thus our code-base used sizeof() - 1
instead.
This has been resolved for years, so let's use the correct function. As
a bonus point, we can remove a few variable making the code tad easier
to follow.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/354
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>