diff options
author | bde <bde@FreeBSD.org> | 1999-12-24 15:33:36 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-12-24 15:33:36 +0000 |
commit | d8ee3ca193b92be71a83f36703c80fcecad5c283 (patch) | |
tree | 5b9e51e7c52efe321e268f949685950846e7401d /sys | |
parent | 28208a284bc153c95aeb50461cfbd7e72d63edbc (diff) | |
download | FreeBSD-src-d8ee3ca193b92be71a83f36703c80fcecad5c283.zip FreeBSD-src-d8ee3ca193b92be71a83f36703c80fcecad5c283.tar.gz |
Fixed a cast of a pointer to an integer of a possibly different size.
Fixed casts of non-`void *' pointers to uintptr_t. Fixed related
style bugs. This file uses perfectly non-KNF formatting for casts.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/link_aout.c | 4 | ||||
-rw-r--r-- | sys/kern/link_elf.c | 6 | ||||
-rw-r--r-- | sys/kern/link_elf_obj.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c index 6081a9c..de5518d 100644 --- a/sys/kern/link_aout.c +++ b/sys/kern/link_aout.c @@ -563,17 +563,17 @@ link_aout_search_symbol(linker_file_t lf, caddr_t value, aout_file_t af = lf->priv; u_long off = (uintptr_t) (void *) value; u_long diff = off; + u_long sp_nz_value; struct nzlist* sp; struct nzlist* ep; struct nzlist* best = 0; - u_long sp_nz_value; for (sp = AOUT_RELOC(af, struct nzlist, LD_SYMBOL(af->dynamic)), ep = (struct nzlist *) ((caddr_t) sp + LD_STABSZ(af->dynamic)); sp < ep; sp++) { if (sp->nz_name == 0) continue; - sp_nz_value = sp->nz_value + (u_long)af->address; + sp_nz_value = sp->nz_value + (uintptr_t) (void *) af->address; if (off >= sp_nz_value) { if (off - sp_nz_value < diff) { diff = off - sp_nz_value; diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 0fefb50..daf3b30 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -953,17 +953,17 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t* sym, long* diffp) { elf_file_t ef = lf->priv; - u_long off = (uintptr_t) value; + u_long off = (uintptr_t) (void *) value; u_long diff = off; + u_long st_value; const Elf_Sym* es; const Elf_Sym* best = 0; int i; - u_long st_value; for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) { if (es->st_name == 0) continue; - st_value = es->st_value + (u_long)ef->address; + st_value = es->st_value + (uintptr_t) (void *) ef->address; if (off >= st_value) { if (off - st_value < diff) { diff = off - st_value; diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 0fefb50..daf3b30 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -953,17 +953,17 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t* sym, long* diffp) { elf_file_t ef = lf->priv; - u_long off = (uintptr_t) value; + u_long off = (uintptr_t) (void *) value; u_long diff = off; + u_long st_value; const Elf_Sym* es; const Elf_Sym* best = 0; int i; - u_long st_value; for (i = 0, es = ef->ddbsymtab; i < ef->ddbsymcnt; i++, es++) { if (es->st_name == 0) continue; - st_value = es->st_value + (u_long)ef->address; + st_value = es->st_value + (uintptr_t) (void *) ef->address; if (off >= st_value) { if (off - st_value < diff) { diff = off - st_value; |