diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-06 03:05:54 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-06 03:05:54 +0000 |
commit | 6bef3d1d2216234454875052220ca0f477a820b4 (patch) | |
tree | 717060345370b781d3d1cde7ab4dd29304a066e8 /runit | |
parent | 1bec1b980e3cf5ad604fb0c2038a3ab83d9ab5f5 (diff) | |
download | busybox-w32-6bef3d1d2216234454875052220ca0f477a820b4.tar.gz busybox-w32-6bef3d1d2216234454875052220ca0f477a820b4.tar.bz2 busybox-w32-6bef3d1d2216234454875052220ca0f477a820b4.zip |
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 2ed9054fd..bedd5401f 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) | |||
233 | if (!c) return !len; | 233 | if (!c) return !len; |
234 | switch (c) { | 234 | switch (c) { |
235 | case '*': | 235 | case '*': |
236 | if (!(c = *p)) return 1; | 236 | c = *p; |
237 | if (!c) return 1; | ||
237 | for (;;) { | 238 | for (;;) { |
238 | if (!len) return 0; | 239 | if (!len) return 0; |
239 | if (*s == c) break; | 240 | if (*s == c) break; |
240 | ++s; --len; | 241 | ++s; |
242 | --len; | ||
241 | } | 243 | } |
242 | continue; | 244 | continue; |
243 | case '+': | 245 | case '+': |
244 | if ((c = *p++) != *s) return 0; | 246 | c = *p++; |
247 | if (c != *s) return 0; | ||
245 | for (;;) { | 248 | for (;;) { |
246 | if (!len) return 1; | 249 | if (!len) return 1; |
247 | if (*s != c) break; | 250 | if (*s != c) break; |
248 | ++s; --len; | 251 | ++s; |
252 | --len; | ||
249 | } | 253 | } |
250 | continue; | 254 | continue; |
251 | /* | 255 | /* |
@@ -260,7 +264,8 @@ unsigned pmatch(const char *p, const char *s, unsigned len) | |||
260 | default: | 264 | default: |
261 | if (!len) return 0; | 265 | if (!len) return 0; |
262 | if (*s != c) return 0; | 266 | if (*s != c) return 0; |
263 | ++s; --len; | 267 | ++s; |
268 | --len; | ||
264 | continue; | 269 | continue; |
265 | } | 270 | } |
266 | } | 271 | } |