mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Improve readability for the recently introduced changes by having
their sizeof(*p) instead of explicitlly specifying their types. Suggested by: nectar
This commit is contained in:
parent
6901ba9306
commit
74b67e8422
1 changed files with 4 additions and 4 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue