mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
unsigned long long -> uint64_t
This commit is contained in:
parent
ebee2b7852
commit
3f6e88a552
26 changed files with 67 additions and 71 deletions
|
@ -150,17 +150,17 @@ static void skipGeneric(Source & source)
|
|||
|
||||
static void parseContents(ParseSink & sink, Source & source, const Path & path)
|
||||
{
|
||||
unsigned long long size = readLongLong(source);
|
||||
uint64_t size = readLongLong(source);
|
||||
|
||||
sink.preallocateContents(size);
|
||||
|
||||
unsigned long long left = size;
|
||||
uint64_t left = size;
|
||||
std::vector<unsigned char> buf(65536);
|
||||
|
||||
while (left) {
|
||||
checkInterrupt();
|
||||
auto n = buf.size();
|
||||
if ((unsigned long long)n > left) n = left;
|
||||
if ((uint64_t)n > left) n = left;
|
||||
source(buf.data(), n);
|
||||
sink.receiveContents(buf.data(), n);
|
||||
left -= n;
|
||||
|
@ -323,7 +323,7 @@ struct RestoreSink : ParseSink
|
|||
throw SysError("fchmod");
|
||||
}
|
||||
|
||||
void preallocateContents(unsigned long long len)
|
||||
void preallocateContents(uint64_t len)
|
||||
{
|
||||
#if HAVE_POSIX_FALLOCATE
|
||||
if (len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue