diff options
author | Vincent Ambo <mail@tazj.in> | 2020-07-15T19·52+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-07-16T00·37+0000 |
commit | 4303cedde4eaf506771fb7129b8cafc771a7472f (patch) | |
tree | cee012c93988861f5ff7de7a4e29c2876ad5f90a /third_party/nix/src/libexpr | |
parent | d8ee0afda9c6947eb9477b7bfe0cec81628ef2fe (diff) |
style(3p/nix): Minor style fix in DrvInfo::setMeta r/1307
Paired-With: Perry Lorier <isomer@tvl.fyi> Change-Id: I0655ecc675239b3d90e5adc305c3f37c1a904cf5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1181 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/libexpr')
-rw-r--r-- | third_party/nix/src/libexpr/get-drvs.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/third_party/nix/src/libexpr/get-drvs.cc b/third_party/nix/src/libexpr/get-drvs.cc index d21e8ba896ca..33bded2fa265 100644 --- a/third_party/nix/src/libexpr/get-drvs.cc +++ b/third_party/nix/src/libexpr/get-drvs.cc @@ -292,9 +292,8 @@ bool DrvInfo::queryMetaBool(const std::string& name, bool def) { } void DrvInfo::setMeta(const std::string& name, Value* v) { - getMeta(); - Bindings* old = meta; - meta = Bindings::NewGC(old->size()); + Bindings* old = getMeta(); + meta = Bindings::NewGC(old->size() + 1); Symbol sym = state->symbols.Create(name); if (old != nullptr) { for (auto i : *old) { |