summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6bfa33217914..fe693304b120 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -833,8 +833,10 @@ static int match(const char *sym, const char * const pat[])
{
const char *p;
while (*pat) {
+ const char *endp;
+
p = *pat++;
- const char *endp = p + strlen(p) - 1;
+ endp = p + strlen(p) - 1;
/* "*foo*" */
if (*p == '*' && *endp == '*') {