summaryrefslogtreecommitdiffstats
path: root/sbin/ldconfig
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-01-14 15:49:05 +0000
committerdelphij <delphij@FreeBSD.org>2005-01-14 15:49:05 +0000
commit0c16fd32cca2a79000850e2bf71719145f42ca2f (patch)
treeed1e76523875c5be4d919ac41a816b40b9d8808c /sbin/ldconfig
parent9dd6141c7e82675d0fb60bcc5f90a47c8c22111d (diff)
downloadFreeBSD-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/ldconfig')
-rw-r--r--sbin/ldconfig/ldconfig.c8
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++) {
OpenPOWER on IntegriCloud