about summary refs log tree commit diff
path: root/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
diff options
context:
space:
mode:
authorKane York <kanepyork@gmail.com>2020-07-25T04·09-0700
committerkanepyork <rikingcoding@gmail.com>2020-07-27T21·16+0000
commitef54f5da9fa30b5c302f2a49595ee5d041f9706a (patch)
tree8d1da709a2e2d3b135d1e84eda9c402bde467726 /third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
parent69f402563a14d4b668980e4228d033d80e3bb05d (diff)
fix(3p/nix): apply all clang-tidy fixes r/1495
Change-Id: I265e763393422ee1881653527c91024458060825
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1432
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc')
-rw-r--r--third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
index dc0dce345bcd..0e5b2ec8a537 100644
--- a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
+++ b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc
@@ -33,7 +33,7 @@ std::string resolveMirrorUri(EvalState& state, std::string uri) {
   }
   std::string mirrorName(s, 0, p);
 
-  Value vMirrors;
+  Value vMirrors{};
   state.eval(
       state.parseExprFromString(
           "import <nixpkgs/pkgs/build-support/fetchurl/mirrors.nix>", "."),
@@ -120,7 +120,7 @@ static int _main(int argc, char** argv) {
     } else {
       Path path =
           resolveExprPath(lookupFileArg(*state, args.empty() ? "." : args[0]));
-      Value vRoot;
+      Value vRoot{};
       state->evalFile(path, vRoot);
       Value& v(*findAlongAttrPath(*state, attrPath, autoArgs, vRoot));
       state->forceAttrs(v);
@@ -180,7 +180,7 @@ static int _main(int argc, char** argv) {
       auto actualUri = resolveMirrorUri(*state, uri);
 
       AutoDelete tmpDir(createTempDir(), true);
-      Path tmpFile = (Path)tmpDir + "/tmp";
+      Path tmpFile = Path(tmpDir) + "/tmp";
 
       /* Download the file. */
       {
@@ -200,7 +200,7 @@ static int _main(int argc, char** argv) {
       /* Optionally unpack the file. */
       if (unpack) {
         LOG(INFO) << "unpacking...";
-        Path unpacked = (Path)tmpDir + "/unpacked";
+        Path unpacked = Path(tmpDir) + "/unpacked";
         createDirs(unpacked);
         if (absl::EndsWith(baseNameOf(uri), ".zip")) {
           runProgram("unzip", true, {"-qq", tmpFile, "-d", unpacked});