[LTP] [PATCH v7 1/4] lib: add module is loaded check
Cyril Hrubis
chrubis@suse.cz
Wed Nov 11 17:13:52 CET 2026
Hi!
> The length check above already guarantees this: p is advanced to the
> first whitespace, so (p - line) is the length of the whole module name
> field. If mod_name were a prefix of an unrelated module, the lengths
> would differ and we continue before the character comparison. By the
> time i == mod_len, line[mod_len] is exactly the field boundary.
>
> if ((size_t)(p - line) != mod_len)
> continue;
Sorry, of course it's right there, missed that.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list