libexpr: Remove unnecessary drvName assignment in prim_derivationStrict

drvName is already assigned to the same value right at the start of the
function.
This commit is contained in:
Tuomas Tynkkynen 2018-02-17 16:51:10 +02:00
parent 7e0360504d
commit 66eeff3345

View file

@ -612,8 +612,6 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
drv.builder = state.forceString(*i->value, context, posDrvName); drv.builder = state.forceString(*i->value, context, posDrvName);
else if (i->name == state.sSystem) else if (i->name == state.sSystem)
drv.platform = state.forceStringNoCtx(*i->value, posDrvName); drv.platform = state.forceStringNoCtx(*i->value, posDrvName);
else if (i->name == state.sName)
drvName = state.forceStringNoCtx(*i->value, posDrvName);
else if (i->name == state.sOutputHash) else if (i->name == state.sOutputHash)
outputHash = state.forceStringNoCtx(*i->value, posDrvName); outputHash = state.forceStringNoCtx(*i->value, posDrvName);
else if (i->name == state.sOutputHashAlgo) else if (i->name == state.sOutputHashAlgo)
@ -634,10 +632,6 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
drv.env.emplace(key, s); drv.env.emplace(key, s);
if (i->name == state.sBuilder) drv.builder = s; if (i->name == state.sBuilder) drv.builder = s;
else if (i->name == state.sSystem) drv.platform = s; else if (i->name == state.sSystem) drv.platform = s;
else if (i->name == state.sName) {
drvName = s;
printMsg(lvlVomit, format("derivation name is '%1%'") % drvName);
}
else if (i->name == state.sOutputHash) outputHash = s; else if (i->name == state.sOutputHash) outputHash = s;
else if (i->name == state.sOutputHashAlgo) outputHashAlgo = s; else if (i->name == state.sOutputHashAlgo) outputHashAlgo = s;
else if (i->name == state.sOutputHashMode) handleHashMode(s); else if (i->name == state.sOutputHashMode) handleHashMode(s);