about summary refs log tree commit diff
path: root/src/download-via-ssh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-14T10·48+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-14T10·48+0100
commitdba33d4018c07699b59f024ca61442c896579c64 (patch)
treedb6ed21270e77bc497adf44014530819c5318837 /src/download-via-ssh
parent61fd494d760d667649fa48665f9aa75ba88a1eb6 (diff)
Minor style fixes
Diffstat (limited to 'src/download-via-ssh')
-rw-r--r--src/download-via-ssh/download-via-ssh.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/download-via-ssh/download-via-ssh.cc b/src/download-via-ssh/download-via-ssh.cc
index d85f1572f33e..68fdeb4ca25e 100644
--- a/src/download-via-ssh/download-via-ssh.cc
+++ b/src/download-via-ssh/download-via-ssh.cc
@@ -16,7 +16,9 @@ using namespace nix;
 // * use a database
 // * show progress
 
-static std::pair<FdSink, FdSource> connect(string conn) {
+
+static std::pair<FdSink, FdSource> connect(const string & conn)
+{
     Pipe to, from;
     to.create();
     from.create();
@@ -51,7 +53,9 @@ static std::pair<FdSink, FdSource> connect(string conn) {
     return std::pair<FdSink, FdSource>(to.writeSide.borrow(), from.readSide.borrow());
 }
 
-static void substitute(std::pair<FdSink, FdSource> & pipes, Path storePath, Path destPath) {
+
+static void substitute(std::pair<FdSink, FdSource> & pipes, Path storePath, Path destPath)
+{
     writeInt(cmdSubstitute, pipes.first);
     writeString(storePath, pipes.first);
     pipes.first.flush();
@@ -59,7 +63,9 @@ static void substitute(std::pair<FdSink, FdSource> & pipes, Path storePath, Path
     std::cout << std::endl;
 }
 
-static void query(std::pair<FdSink, FdSource> & pipes) {
+
+static void query(std::pair<FdSink, FdSource> & pipes)
+{
     writeInt(cmdQuery, pipes.first);
     for (string line; getline(std::cin, line);) {
         Strings tokenized = tokenizeString<Strings>(line);
@@ -92,6 +98,7 @@ static void query(std::pair<FdSink, FdSource> & pipes) {
     }
 }
 
+
 void run(Strings args)
 {
     if (args.empty())
@@ -129,6 +136,7 @@ void run(Strings args)
         throw UsageError(format("download-via-ssh: unknown command `%1%'") % *i);
 }
 
+
 void printHelp()
 {
     std::cerr << "Usage: download-via-ssh --query|--substitute store-path dest-path" << std::endl;