commit | 7ce505f0d3020eb0266fc70ebc3bb634b092339d | [log] [tgz] |
---|---|---|
author | Kenny Root <kroot@google.com> | Wed Nov 21 15:15:34 2012 -0800 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Nov 21 15:15:34 2012 -0800 |
tree | 8a1e957f41a484a6b78656bb48889c038fe59bc3 | |
parent | 1c405f27276f77a1dccbbe13ddc39e4160a41ad9 [diff] | |
parent | 5281edbc9445065479e92a6c86da462f3943c2ca [diff] |
Merge "Actually terminate on EOF"
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp index ee1283c..2612325 100644 --- a/keystore/keystore.cpp +++ b/keystore/keystore.cpp
@@ -296,7 +296,7 @@ size_t remaining = size; while (remaining > 0) { ssize_t n = TEMP_FAILURE_RETRY(read(fd, data, remaining)); - if (n < 0) { + if (n <= 0) { return size - remaining; } data += n;