summaryrefslogtreecommitdiff
path: root/netfs/fuse
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-04-27 01:52:37 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-04-27 01:52:37 +0100
commit24570f6dabef2923280e38894627244954c328a1 (patch)
tree23b45fb24f2279611ddeced84997010b5ded7e18 /netfs/fuse
parentHandle async write errors (diff)
downloadnetfs-24570f6dabef2923280e38894627244954c328a1.tar.bz2
netfs-24570f6dabef2923280e38894627244954c328a1.tar.xz
netfs-24570f6dabef2923280e38894627244954c328a1.zip
Prefer std::copy over memcpy, handles case of null data ptr when empty
Diffstat (limited to 'netfs/fuse')
-rw-r--r--netfs/fuse/fuseFiles.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp
index f08c1dd..d2aae51 100644
--- a/netfs/fuse/fuseFiles.cpp
+++ b/netfs/fuse/fuseFiles.cpp
@@ -154,7 +154,7 @@ namespace NetFS {
{
try {
auto cpy = [buf](const auto && data) -> int {
- memcpy(buf, &data.front(), data.size());
+ std::copy(data.begin(), data.end(), buf);
return safe {data.size()};
};
auto of = getProxy<OpenFilePtr>(fi->fh);