fbset: fix buglet where we were using wrong pointer
readahead: stop using stdio.h *: style fixes
This commit is contained in:
@@ -233,19 +233,23 @@ unsigned pmatch(const char *p, const char *s, unsigned len)
|
||||
if (!c) return !len;
|
||||
switch (c) {
|
||||
case '*':
|
||||
if (!(c = *p)) return 1;
|
||||
c = *p;
|
||||
if (!c) return 1;
|
||||
for (;;) {
|
||||
if (!len) return 0;
|
||||
if (*s == c) break;
|
||||
++s; --len;
|
||||
++s;
|
||||
--len;
|
||||
}
|
||||
continue;
|
||||
case '+':
|
||||
if ((c = *p++) != *s) return 0;
|
||||
c = *p++;
|
||||
if (c != *s) return 0;
|
||||
for (;;) {
|
||||
if (!len) return 1;
|
||||
if (*s != c) break;
|
||||
++s; --len;
|
||||
++s;
|
||||
--len;
|
||||
}
|
||||
continue;
|
||||
/*
|
||||
@@ -260,7 +264,8 @@ unsigned pmatch(const char *p, const char *s, unsigned len)
|
||||
default:
|
||||
if (!len) return 0;
|
||||
if (*s != c) return 0;
|
||||
++s; --len;
|
||||
++s;
|
||||
--len;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user