diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-11-13 06:36:58 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-11-13 06:36:58 +0000 |
commit | 804b61213e97f35687d636f985f1142b51ab410e (patch) | |
tree | 567b93ce616d7b5d6187a70ef88ce534560cdd2a /libexec | |
parent | 326020d68cf3f53e57d02a210694f31d3c5484f8 (diff) |
Reduce casts by careful use of char*
ok deraadt@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/ldconfig/prebind.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libexec/ld.so/ldconfig/prebind.c b/libexec/ld.so/ldconfig/prebind.c index 75d48ee53cf..5cc3cecd687 100644 --- a/libexec/ld.so/ldconfig/prebind.c +++ b/libexec/ld.so/ldconfig/prebind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prebind.c,v 1.23 2013/11/13 05:41:43 deraadt Exp $ */ +/* $OpenBSD: prebind.c,v 1.24 2013/11/13 06:36:57 guenther Exp $ */ /* * Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com> * @@ -127,7 +127,7 @@ struct prebind_info { int objarray_cnt; int objarray_sz; -void copy_oldsymcache(int objidx, void *prebind_data); +void copy_oldsymcache(int objidx, char *prebind_data); void elf_load_existing_prebind(struct elf_object *object, int fd); void insert_sym_objcache(struct elf_object *, int, const struct elf_object *, const Elf_Sym *, int); @@ -2226,7 +2226,7 @@ elf_load_existing_prebind(struct elf_object *object, int fd) } void -copy_oldsymcache(int objidx, void *prebind_map) +copy_oldsymcache(int objidx, char *prebind_map) { struct prebind_footer *footer; struct elf_object *tobj; @@ -2244,8 +2244,8 @@ copy_oldsymcache(int objidx, void *prebind_map) c += offset; footer = (void *)c; - nameidx = (void *)((char *)prebind_map + footer->nameidx_idx); - nametab = (void *)((char *)prebind_map + footer->nametab_idx); + nameidx = (void *)(prebind_map + footer->nameidx_idx); + nametab = (void *)(prebind_map + footer->nametab_idx); idxtolib = xcalloc(footer->numlibs, sizeof(int)); found = 0; @@ -2273,7 +2273,7 @@ copy_oldsymcache(int objidx, void *prebind_map) /* build idxtolibs */ tcache = objarray[objidx].symcache; - symcache = (void *)((char *)prebind_map + footer->symcache_idx); + symcache = (void *)(prebind_map + footer->symcache_idx); for (i = 0; i < footer->symcache_cnt; i++) { tobj = objarray[idxtolib[symcache[i].obj_idx]].obj; @@ -2284,7 +2284,7 @@ copy_oldsymcache(int objidx, void *prebind_map) } tcache = objarray[objidx].pltsymcache; - symcache = (void *)((char *)prebind_map + footer->pltsymcache_idx); + symcache = (void *)(prebind_map + footer->pltsymcache_idx); for (i = 0; i < footer->pltsymcache_cnt; i++) { tobj = objarray[idxtolib[symcache[i].obj_idx]].obj; |