diff options
Diffstat (limited to 'modutils/depmod.c')
-rw-r--r-- | modutils/depmod.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modutils/depmod.c b/modutils/depmod.c index 37a8482d9..9713aef92 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c | |||
@@ -55,7 +55,7 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA | |||
55 | NULL | 55 | NULL |
56 | ); | 56 | ); |
57 | for (ptr = image; ptr < image + len - 10; ptr++) { | 57 | for (ptr = image; ptr < image + len - 10; ptr++) { |
58 | if (strncmp(ptr, "depends=", 8) == 0) { | 58 | if (is_prefixed_with(ptr, "depends=")) { |
59 | char *u; | 59 | char *u; |
60 | 60 | ||
61 | ptr += 8; | 61 | ptr += 8; |
@@ -64,15 +64,15 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA | |||
64 | *u = '_'; | 64 | *u = '_'; |
65 | ptr += string_to_llist(ptr, &info->dependencies, ","); | 65 | ptr += string_to_llist(ptr, &info->dependencies, ","); |
66 | } else if (ENABLE_FEATURE_MODUTILS_ALIAS | 66 | } else if (ENABLE_FEATURE_MODUTILS_ALIAS |
67 | && strncmp(ptr, "alias=", 6) == 0 | 67 | && is_prefixed_with(ptr, "alias=") |
68 | ) { | 68 | ) { |
69 | llist_add_to(&info->aliases, xstrdup(ptr + 6)); | 69 | llist_add_to(&info->aliases, xstrdup(ptr + 6)); |
70 | ptr += strlen(ptr); | 70 | ptr += strlen(ptr); |
71 | } else if (ENABLE_FEATURE_MODUTILS_SYMBOLS | 71 | } else if (ENABLE_FEATURE_MODUTILS_SYMBOLS |
72 | && strncmp(ptr, "__ksymtab_", 10) == 0 | 72 | && is_prefixed_with(ptr, "__ksymtab_") |
73 | ) { | 73 | ) { |
74 | ptr += 10; | 74 | ptr += 10; |
75 | if (strncmp(ptr, "gpl", 3) == 0 | 75 | if (is_prefixed_with(ptr, "gpl") |
76 | || strcmp(ptr, "strings") == 0 | 76 | || strcmp(ptr, "strings") == 0 |
77 | ) { | 77 | ) { |
78 | continue; | 78 | continue; |