trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [1/3] git commit: TS-1476: LogFile::exists() should not accept NULL
Date Thu, 06 Jun 2013 16:24:00 GMT
Updated Branches:
  refs/heads/master 3f45624cb -> 369135c0c


TS-1476: LogFile::exists() should not accept NULL


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/369135c0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/369135c0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/369135c0

Branch: refs/heads/master
Commit: 369135c0c9a9f27872f5d0c4c71dc629c93f6eb0
Parents: 76ea8c5
Author: James Peach <jpeach@apache.org>
Authored: Wed Jun 5 20:50:30 2013 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Thu Jun 6 09:23:38 2013 -0700

----------------------------------------------------------------------
 proxy/logging/LogFile.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/369135c0/proxy/logging/LogFile.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index f968834..a47ba63 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -169,7 +169,8 @@ LogFile::~LogFile()
 
 bool LogFile::exists(const char *pathname)
 {
-  return (::access(pathname, F_OK) == 0);
+  ink_assert(pathname != NULL);
+  return (pathname && ::access(pathname, F_OK) == 0);
 }
 
 /*-------------------------------------------------------------------------


Mime
View raw message