You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/02/28 17:31:57 UTC

[trafficserver] 04/06: Fix the expression for checking file descriptor

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

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit fdb98bcbda715b706549c2a1cbc0f86e7c6e7e75
Author: Persia Aziz <pe...@yahoo-inc.com>
AuthorDate: Tue Feb 27 14:49:10 2018 -0600

    Fix the expression for checking file descriptor
    
    (cherry picked from commit 9fc730be02f229228fdde23c13bf0365c07d9d47)
---
 iocore/hostdb/P_RefCountCacheSerializer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/hostdb/P_RefCountCacheSerializer.h b/iocore/hostdb/P_RefCountCacheSerializer.h
index 853fd4e..bd11f5c 100644
--- a/iocore/hostdb/P_RefCountCacheSerializer.h
+++ b/iocore/hostdb/P_RefCountCacheSerializer.h
@@ -228,7 +228,7 @@ int
 RefCountCacheSerializer<C>::initialize_storage(int /* event */, Event *e)
 {
   this->fd = socketManager.open(this->tmp_filename.c_str(), O_TRUNC | O_RDWR | O_CREAT, 0644); // TODO: configurable perms
-  if (this->fd == -1) {
+  if (this->fd < 0) {
     Warning("Unable to create temporary file %s, unable to persist hostdb: %s", this->tmp_filename.c_str(), strerror(errno));
     delete this;
     return EVENT_DONE;

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