You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/05/10 13:25:28 UTC

[trafficserver] branch master updated: coverity: bulkfile ignored sign

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new b521591  coverity: bulkfile ignored sign
b521591 is described below

commit b521591493f44a1b5ac0017103656a03c7097fd8
Author: Aaron Canary <ac...@oath.com>
AuthorDate: Thu May 10 12:47:03 2018 +0100

    coverity: bulkfile ignored sign
---
 cmd/traffic_cache_tool/File.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmd/traffic_cache_tool/File.cc b/cmd/traffic_cache_tool/File.cc
index 29cd873..526d303 100644
--- a/cmd/traffic_cache_tool/File.cc
+++ b/cmd/traffic_cache_tool/File.cc
@@ -108,8 +108,10 @@ BulkFile::load()
   if (0 == fstat(fd, &info)) {
     size_t n = info.st_size;
     _content.resize(n + 2);
-    auto data = const_cast<char *>(_content.data());
-    if (0 < (_len = read(fd, data, n))) {
+    auto data     = const_cast<char *>(_content.data());
+    auto read_len = read(fd, data, n);
+    if (0 < read_len) {
+      _len = read_len;
       // Force a trailing linefeed and nul.
       memset(data + _len, 0, 2);
       if (data[n - 1] != '\n') {

-- 
To stop receiving notification emails like this one, please contact
maskit@apache.org.