aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/filetransfer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/filetransfer.cc')
-rw-r--r--src/libstore/filetransfer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc
index b843a95f9..ef2480863 100644
--- a/src/libstore/filetransfer.cc
+++ b/src/libstore/filetransfer.cc
@@ -142,7 +142,7 @@ struct curlFileTransfer : public FileTransfer
template<class T>
void fail(T && e)
{
- failEx(std::make_exception_ptr(std::move(e)));
+ failEx(std::make_exception_ptr(std::forward<T>(e)));
}
LambdaSink finalSink;
@@ -270,6 +270,9 @@ struct curlFileTransfer : public FileTransfer
return 0;
auto count = std::min(size * nitems, request.data->length() - readOffset);
assert(count);
+ // Lint: this is turning a string into a byte array to hand to
+ // curl, which is fine.
+ // NOLINTNEXTLINE(bugprone-not-null-terminated-result)
memcpy(buffer, request.data->data() + readOffset, count);
readOffset += count;
return count;