diff options
author | Denis Vlasenko | 2007-11-06 03:05:54 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-11-06 03:05:54 +0000 |
commit | 6bef3d1d2216234454875052220ca0f477a820b4 (patch) | |
tree | 717060345370b781d3d1cde7ab4dd29304a066e8 /runit | |
parent | 1bec1b980e3cf5ad604fb0c2038a3ab83d9ab5f5 (diff) | |
download | busybox-6bef3d1d2216234454875052220ca0f477a820b4.zip busybox-6bef3d1d2216234454875052220ca0f477a820b4.tar.gz |
fbset: fix buglet where we were using wrong pointer
readahead: stop using stdio.h
*: style fixes
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runit_lib.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/runit/runit_lib.c b/runit/runit_lib.c index 2ed9054..bedd540 100644 --- a/runit/runit_lib.c +++ b/runit/runit_lib.c @@ -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; } } |