mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
ar: use array notation to access s_so
This is somewhat more readable than pointer arithmetic. Also remove an unnecessary cast while here. MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
e5228a95c6
commit
687c09042f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346569
|
@ -673,11 +673,11 @@ write_objs(struct bsdar *bsdar)
|
|||
|
||||
for (i = 0; (size_t)i < bsdar->s_cnt; i++) {
|
||||
if (w_sz == sizeof(uint32_t))
|
||||
*(bsdar->s_so + i) =
|
||||
htobe32((uint32_t)(*(bsdar->s_so + i)) + pm_sz);
|
||||
bsdar->s_so[i] =
|
||||
htobe32(bsdar->s_so[i] + pm_sz);
|
||||
else
|
||||
*(bsdar->s_so + i) =
|
||||
htobe64(*(bsdar->s_so + i) + pm_sz);
|
||||
bsdar->s_so[i] =
|
||||
htobe64(bsdar->s_so[i] + pm_sz);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue