]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/boot/pc/sub.c
9boot: replace strrchr() call with a loop and strchr() for ignoring bang path prefixes
[plan9front.git] / sys / src / boot / pc / sub.c
index fafe69ac02bf8fe4da736eb4b13be5dce1382977..470d31c39ed7e1a3f65db813e53c1573f0caa521 100644 (file)
@@ -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;
@@ -344,10 +333,6 @@ e820conf(void)
        s = confend;
 
        do{
-               e.base = 0;
-               e.len = 0;
-               e.typ = 0;
-               e.ext = 1;
                bx = e820(bx, &e);
                if(e.typ == 1 && e.len != 0 && (e.ext & 3) == 1){
                        if(confend == s){