diff options
author | peter <peter@FreeBSD.org> | 1999-11-21 04:26:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-21 04:26:48 +0000 |
commit | 216e35006e551f69144762215a7ef9762298fe98 (patch) | |
tree | 408c546667ad68d073b739a9fae743a2cc3c218a /sys/kern/kern_linker.c | |
parent | bc517213b48aad16f9ee93b012cb65efddcc204c (diff) | |
download | FreeBSD-src-216e35006e551f69144762215a7ef9762298fe98.zip FreeBSD-src-216e35006e551f69144762215a7ef9762298fe98.tar.gz |
Tempt fate and stop index from converting a const char * into a char *.
I've made a seperate version (c_index() etc) that use const/const, but
I'm not sure it's worth it considering there is one file in the tree
that uses index on const strings (kern_linker.c) and it's easily adjusted
to scan the strings directly (and is perhaps more efficient that way).
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r-- | sys/kern/kern_linker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 9262e54..f8054ca 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -345,7 +345,7 @@ linker_make_file(const char* pathname, void* priv, struct linker_file_ops* ops) int namelen; const char *filename; - filename = rindex(pathname, '/'); + filename = c_rindex(pathname, '/'); if (filename && filename[1]) filename++; else @@ -993,7 +993,7 @@ linker_search_path(const char *name) enum vtype type; /* qualified at all? */ - if (index(name, '/')) + if (c_index(name, '/')) return(linker_strdup(name)); /* traverse the linker path */ |