diff options
author | delphij <delphij@FreeBSD.org> | 2005-01-14 15:49:05 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-01-14 15:49:05 +0000 |
commit | 0c16fd32cca2a79000850e2bf71719145f42ca2f (patch) | |
tree | ed1e76523875c5be4d919ac41a816b40b9d8808c /sbin | |
parent | 9dd6141c7e82675d0fb60bcc5f90a47c8c22111d (diff) | |
download | FreeBSD-src-0c16fd32cca2a79000850e2bf71719145f42ca2f.zip FreeBSD-src-0c16fd32cca2a79000850e2bf71719145f42ca2f.tar.gz |
Improve readability for the recently introduced changes by having
their sizeof(*p) instead of explicitlly specifying their types.
Suggested by: nectar
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ldconfig/ldconfig.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 8f5fb91..b328bde 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -495,8 +495,8 @@ buildhints() warn("%s", hints_file); return -1; } - if (write(fd, blist, hdr.hh_nbucket * sizeof(struct hints_bucket)) != - (ssize_t)(hdr.hh_nbucket * sizeof(struct hints_bucket))) { + if (write(fd, blist, hdr.hh_nbucket * sizeof(*blist)) != + (ssize_t)(hdr.hh_nbucket * sizeof(*blist))) { warn("%s", hints_file); return -1; } @@ -585,11 +585,11 @@ readhints() if (rescan) return 0; - blist = malloc(sizeof(struct hints_bucket) * hdr->hh_nbucket); + blist = malloc(sizeof(*blist) * hdr->hh_nbucket); if (blist == NULL) err(1, "readhints"); memcpy(blist, (char *)addr + hdr->hh_hashtab, - sizeof(struct hints_bucket) * hdr->hh_nbucket); + sizeof(*blist) * hdr->hh_nbucket); for (i = 0; i < hdr->hh_nbucket; i++) { |