mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
libutil/archive: Use alignUp
With this change it's much more apparent what's going on.
This commit is contained in:
parent
a91b787524
commit
22c73868c3
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <strings.h> // for strcasecmp
|
||||
|
||||
#include "nix/util/archive.hh"
|
||||
#include "nix/util/alignment.hh"
|
||||
#include "nix/util/config-global.hh"
|
||||
#include "nix/util/posix-source-accessor.hh"
|
||||
#include "nix/util/source-path.hh"
|
||||
|
|
@ -133,7 +134,7 @@ static void parseContents(CreateRegularFileSink & sink, Source & source)
|
|||
sink.preallocateContents(size);
|
||||
|
||||
if (sink.skipContents) {
|
||||
source.skip(size + (size % 8 ? 8 - (size % 8) : 0));
|
||||
source.skip(alignUp(size, 8));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue