diff options
author | 2005-11-28 17:50:32 +0000 | |
---|---|---|
committer | 2005-11-28 17:50:32 +0000 | |
commit | 4a8044cdaf3153b9be62e9350a08eb2d41bf6446 (patch) | |
tree | 33942a13a6d764db60cb8c9c96440d1f0a230b3d | |
parent | unused arg in internal static API (diff) | |
download | wireguard-openbsd-4a8044cdaf3153b9be62e9350a08eb2d41bf6446.tar.xz wireguard-openbsd-4a8044cdaf3153b9be62e9350a08eb2d41bf6446.zip |
some nice off_t casts to please lint
-rw-r--r-- | lib/libc/gen/nlist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 36493ce6c0d..669856a42f2 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nlist.c,v 1.51 2005/08/08 08:05:34 espie Exp $ */ +/* $OpenBSD: nlist.c,v 1.52 2005/11/28 17:50:32 deraadt Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -334,7 +334,7 @@ __elf_fdnlist(int fd, struct nlist *list) if ((shdr = malloc(shdr_size)) == NULL) return (-1); - if (pread(fd, shdr, shdr_size, ehdr.e_shoff) != shdr_size) { + if (pread(fd, shdr, shdr_size, (off_t)ehdr.e_shoff) != shdr_size) { free(shdr); return (-1); } @@ -377,7 +377,7 @@ __elf_fdnlist(int fd, struct nlist *list) if (usemalloc) { if ((strtab = malloc(symstrsize)) == NULL) return (-1); - if (pread(fd, strtab, symstrsize, symstroff) != symstrsize) { + if (pread(fd, strtab, symstrsize, (off_t)symstroff) != symstrsize) { free(strtab); return (-1); } @@ -413,7 +413,7 @@ __elf_fdnlist(int fd, struct nlist *list) while (symsize > 0) { cc = MIN(symsize, sizeof(sbuf)); - if (pread(fd, sbuf, cc, symoff) != cc) + if (pread(fd, sbuf, cc, (off_t)symoff) != cc) break; symsize -= cc; symoff += cc; |