diff options
author | 2016-09-21 04:38:56 +0000 | |
---|---|---|
committer | 2016-09-21 04:38:56 +0000 | |
commit | 3240e6a8f93e9dcb3b95e7fafb9e2b27f13c7c9d (patch) | |
tree | 7368a30a463d94567dfeaa9177978c7039ebf249 /lib/libc/gen/getcap.c | |
parent | sync (diff) | |
download | wireguard-openbsd-3240e6a8f93e9dcb3b95e7fafb9e2b27f13c7c9d.tar.xz wireguard-openbsd-3240e6a8f93e9dcb3b95e7fafb9e2b27f13c7c9d.zip |
Delete casts to off_t and size_t that are implied by assignments
or prototypes. Ditto for some of the char* and void* casts too.
verified no change to instructions on ILP32 (i386) and LP64 (amd64)
ok natano@ abluhm@ deraadt@ millert@
Diffstat (limited to 'lib/libc/gen/getcap.c')
-rw-r--r-- | lib/libc/gen/getcap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index 5b9f812653b..9a8a49ed294 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getcap.c,v 1.33 2015/09/14 16:09:13 tedu Exp $ */ +/* $OpenBSD: getcap.c,v 1.34 2016/09/21 04:38:56 guenther Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -537,8 +537,7 @@ tc_exp: { if (r_end > rp) { char *nrecord; - if ((nrecord = - realloc(record, (size_t)(rp - record))) == NULL) { + if ((nrecord = realloc(record, rp - record)) == NULL) { free(record); errno = ENOMEM; return (-2); @@ -772,7 +771,7 @@ cgetnext(char **cap, char **db_array) */ if (*record != '\0' && *record != '#') { /* Rewind to end of record */ - fseeko(pfp, (off_t)(bp - b_end), SEEK_CUR); + fseeko(pfp, bp - b_end, SEEK_CUR); toprec = record; topreclen = rp - record; break; @@ -924,7 +923,7 @@ cgetstr(char *buf, const char *cap, char **str) if (m_room != 0) { char *nmem; - if ((nmem = realloc(mem, (size_t)(mp - mem))) == NULL) { + if ((nmem = realloc(mem, mp - mem)) == NULL) { free(mem); return (-2); } |