diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-12-26 00:46:07 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-12-26 00:46:07 +0100 |
commit | 15a75e40d01c61eead24204b89ddd8d294b6d1fd (patch) | |
tree | 6cb3dd8cf494cdd08e66d76596d150916dc066de /sys/src/boot | |
parent | 21312484117fbebf8300841684b613a1b3a993fd (diff) |
9boot: replace strrchr() call with a loop and strchr() for ignoring bang path prefixes
Diffstat (limited to 'sys/src/boot')
-rw-r--r-- | sys/src/boot/pc/sub.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/src/boot/pc/sub.c b/sys/src/boot/pc/sub.c index 69027bf2d..470d31c39 100644 --- a/sys/src/boot/pc/sub.c +++ b/sys/src/boot/pc/sub.c @@ -66,17 +66,6 @@ strchr(char *s, int c) return 0; } -char* -strrchr(char *s, int c) -{ - char *r = 0; - - while(s = strchr(s, c)) - r = s++; - - return r; -} - void print(char *s) { @@ -264,7 +253,7 @@ Loop: print("no bootfile\r\n"); goto Loop; } - if(p = strrchr(kern, '!')) + while(p = strchr(kern, '!')) kern = p+1; return kern; |