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

[trafficserver] branch master updated: Fix the expression for checking file descriptor

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

paziz 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 9fc730b  Fix the expression for checking file descriptor
9fc730b is described below

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

    Fix the expression for checking file descriptor
---
 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 a222817..9be439b 100644
--- a/iocore/hostdb/P_RefCountCacheSerializer.h
+++ b/iocore/hostdb/P_RefCountCacheSerializer.h
@@ -230,7 +230,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
paziz@apache.org.