about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/get-drvs.cc')
-rw-r--r--third_party/nix/src/libexpr/get-drvs.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/third_party/nix/src/libexpr/get-drvs.cc b/third_party/nix/src/libexpr/get-drvs.cc
index fb5ada54c860..02ddae1f886c 100644
--- a/third_party/nix/src/libexpr/get-drvs.cc
+++ b/third_party/nix/src/libexpr/get-drvs.cc
@@ -6,7 +6,6 @@
 
 #include <absl/strings/numbers.h>
 #include <glog/logging.h>
-#include <math.h>
 
 #include "libexpr/eval-inline.hh"
 #include "libstore/derivations.hh"
@@ -244,7 +243,7 @@ NixInt DrvInfo::queryMetaInt(const std::string& name, NixInt def) {
   if (v->type == tString) {
     /* Backwards compatibility with before we had support for
        integer meta fields. */
-    NixInt n = 0;
+    NixInt n;
     if (absl::SimpleAtoi(v->string.s, &n)) {
       return n;
     }
@@ -263,7 +262,7 @@ NixFloat DrvInfo::queryMetaFloat(const std::string& name, NixFloat def) {
   if (v->type == tString) {
     /* Backwards compatibility with before we had support for
        float meta fields. */
-    NixFloat n = NAN;
+    NixFloat n;
     if (string2Float(v->string.s, n)) {
       return n;
     }
@@ -368,7 +367,7 @@ static void getDerivations(EvalState& state, Value& vIn,
                            const std::string& pathPrefix, Bindings& autoArgs,
                            DrvInfos& drvs, Done& done,
                            bool ignoreAssertionFailures) {
-  Value v{};
+  Value v;
   state.autoCallFunction(autoArgs, vIn, v);
 
   /* Process the expression. */