about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-07-15T19·52+0100
committertazjin <mail@tazj.in>2020-07-16T00·37+0000
commit4303cedde4eaf506771fb7129b8cafc771a7472f (patch)
treecee012c93988861f5ff7de7a4e29c2876ad5f90a /third_party/nix/src/libexpr/get-drvs.cc
parentd8ee0afda9c6947eb9477b7bfe0cec81628ef2fe (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/get-drvs.cc')
-rw-r--r--third_party/nix/src/libexpr/get-drvs.cc5
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) {