From 09cbc431cca08be891e5e792ceda2a34956b2fc8 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 19 May 2020 18:01:12 +0100 Subject: fix(3p/nix): Fix incorrectly braced conditionals and loops Fixes mistakes introduced by clang-tidy in the previous commit. --- third_party/nix/src/libexpr/primops/fetchGit.cc | 3 +-- third_party/nix/src/libexpr/primops/fetchMercurial.cc | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'third_party/nix/src/libexpr/primops') diff --git a/third_party/nix/src/libexpr/primops/fetchGit.cc b/third_party/nix/src/libexpr/primops/fetchGit.cc index af3f89fde7..7fbd4dc92c 100644 --- a/third_party/nix/src/libexpr/primops/fetchGit.cc +++ b/third_party/nix/src/libexpr/primops/fetchGit.cc @@ -228,9 +228,8 @@ static void prim_fetchGit(EvalState& state, const Pos& pos, Value** args, throw EvalError(format("'url' argument required, at %1%") % pos); } else { - url + url = state.coerceToString(pos, *args[0], context, false, false); } - = state.coerceToString(pos, *args[0], context, false, false); // FIXME: git externals probably can be used to bypass the URI // whitelist. Ah well. diff --git a/third_party/nix/src/libexpr/primops/fetchMercurial.cc b/third_party/nix/src/libexpr/primops/fetchMercurial.cc index 5847f6021f..3de42fe770 100644 --- a/third_party/nix/src/libexpr/primops/fetchMercurial.cc +++ b/third_party/nix/src/libexpr/primops/fetchMercurial.cc @@ -204,9 +204,8 @@ static void prim_fetchMercurial(EvalState& state, const Pos& pos, Value** args, throw EvalError(format("'url' argument required, at %1%") % pos); } else { - url + url = state.coerceToString(pos, *args[0], context, false, false); } - = state.coerceToString(pos, *args[0], context, false, false); // FIXME: git externals probably can be used to bypass the URI // whitelist. Ah well. -- cgit 1.4.1