aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-23 23:14:07 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-23 23:14:07 +0200
commitcb4320c1a0808fe88084d391341da86123b36e6a (patch)
treef612204ed8cfa919ac33b07622159c28304bfb48
parentc8bb2371ebf25ab78abde84e3c5742f9844a74b7 (diff)
Cleanup
-rw-r--r--src/libexpr/eval.cc5
-rw-r--r--src/libexpr/eval.hh26
2 files changed, 13 insertions, 18 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 14169d857..769aae0a9 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -261,14 +261,9 @@ EvalState::EvalState(const Strings & _searchPath)
, sLine(symbols.create("line"))
, sColumn(symbols.create("column"))
, sFunctor(symbols.create("__functor"))
- , repair(false)
, baseEnv(allocEnv(128))
, staticBaseEnv(false, 0)
- , baseEnvDispl(0)
{
- nrEnvs = nrValuesInEnvs = nrValues = nrListElems = 0;
- nrAttrsets = nrAttrsInAttrsets = nrOpUpdates = nrOpUpdateValuesCopied = 0;
- nrListConcats = nrPrimOpCalls = nrFunctionCalls = 0;
countCalls = getEnv("NIX_COUNT_CALLS", "0") != "0";
restricted = settings.get("restrict-eval", false);
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 80eba975e..74a273b54 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -74,7 +74,7 @@ public:
/* If set, force copying files to the Nix store even if they
already exist there. */
- bool repair;
+ bool repair = false;
/* If set, don't allow access to files outside of the Nix search
path or to environment variables. */
@@ -183,7 +183,7 @@ public:
private:
- unsigned int baseEnvDispl;
+ unsigned int baseEnvDispl = 0;
void createBaseEnv();
@@ -240,17 +240,17 @@ public:
private:
- unsigned long nrEnvs;
- unsigned long nrValuesInEnvs;
- unsigned long nrValues;
- unsigned long nrListElems;
- unsigned long nrAttrsets;
- unsigned long nrAttrsInAttrsets;
- unsigned long nrOpUpdates;
- unsigned long nrOpUpdateValuesCopied;
- unsigned long nrListConcats;
- unsigned long nrPrimOpCalls;
- unsigned long nrFunctionCalls;
+ unsigned long nrEnvs = 0;
+ unsigned long nrValuesInEnvs = 0;
+ unsigned long nrValues = 0;
+ unsigned long nrListElems = 0;
+ unsigned long nrAttrsets = 0;
+ unsigned long nrAttrsInAttrsets = 0;
+ unsigned long nrOpUpdates = 0;
+ unsigned long nrOpUpdateValuesCopied = 0;
+ unsigned long nrListConcats = 0;
+ unsigned long nrPrimOpCalls = 0;
+ unsigned long nrFunctionCalls = 0;
bool countCalls;