about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/ssh-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc
index bb536fadfd51..107c6e1ecb4d 100644
--- a/src/libstore/ssh-store.cc
+++ b/src/libstore/ssh-store.cc
@@ -62,9 +62,9 @@ public:
     ForwardSource(Source & readSource, Sink & writeSink) : readSource(readSource), writeSink(writeSink) {}
     size_t read(unsigned char * data, size_t len) override
     {
-        auto res = readSource.read(data, len);
-        writeSink(data, len);
-        return res;
+        auto n = readSource.read(data, len);
+        writeSink(data, n);
+        return n;
     }
 };