diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-27 01:52:37 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-27 01:52:37 +0100 |
commit | 24570f6dabef2923280e38894627244954c328a1 (patch) | |
tree | 23b45fb24f2279611ddeced84997010b5ded7e18 /netfs/fuse | |
parent | Handle async write errors (diff) | |
download | netfs-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.cpp | 2 |
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); |