about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/profiles.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T00·24+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T00·24+0100
commit8cf1322a6fd5ae282d8a09fdba634f27a1a88560 (patch)
tree60a12a457da110f69fb0eea3ffb41b3437a1ad53 /third_party/nix/src/libstore/profiles.cc
parent98299da0fda612b42ab933c47f18163cfef5fa71 (diff)
fix(3p/nix/libstore): Fix error condition when parsing generations r/844
Diffstat (limited to 'third_party/nix/src/libstore/profiles.cc')
-rw-r--r--third_party/nix/src/libstore/profiles.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/profiles.cc b/third_party/nix/src/libstore/profiles.cc
index 3516954b50b7..53e64879954b 100644
--- a/third_party/nix/src/libstore/profiles.cc
+++ b/third_party/nix/src/libstore/profiles.cc
@@ -31,7 +31,7 @@ static int parseName(absl::string_view profileName, absl::string_view name) {
   }
 
   int n;
-  if (!absl::SimpleAtoi(name, &n) && n < 0) {
+  if (!absl::SimpleAtoi(name, &n) || n < 0) {
     return -1;
   }