packfile: replace lseek+read with pread
commit4e61b2214d333a47ec56eb0806be1774f7ac1b7d
authorEric Wong <e@80x24.org>
Thu, 26 Dec 2019 10:42:20 +0000 (26 10:42 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Dec 2019 19:57:46 +0000 (26 11:57 -0800)
treeab2b5a7e1003c35757865432b2632e9427d169f7
parent280738c36ebd19076902796cb07950efc749d89b
packfile: replace lseek+read with pread

We already have pread emulation for portability, so there's
there's no reason to make two syscalls where one suffices.

Furthermore, readers of the packfile will be using mmap
(or pread to emulate mmap), anyways, so the file description
offset does not matter in this case.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c