trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [1/2] trafficserver git commit: Initialize a jtest class members properly
Date Wed, 07 Jan 2015 20:52:46 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master d487bb075 -> c30929227


Initialize a jtest class members properly

Coverity CID #1021678
Coverity CID #1021679


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

Branch: refs/heads/master
Commit: c3092922701f6b9c305822956b5151a05eeb5723
Parents: 4105381
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Wed Jan 7 13:40:58 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Wed Jan 7 13:52:33 2015 -0700

----------------------------------------------------------------------
 tools/jtest/jtest.cc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c3092922/tools/jtest/jtest.cc
----------------------------------------------------------------------
diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index 6f73ee8..0e52e1c 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -52,6 +52,7 @@
 #include <stdlib.h>
 
 #include "ink_defs.h"
+#include "ink_memory.h"
 #include "ink_assert.h"
 #include "INK_MD5.h"
 #include "ParseRules.h"
@@ -387,6 +388,8 @@ struct FD {
 
   void reset() {
     next = 0;
+    nalternate = 0;
+    ip = 0;
     fd = -1;
     read_cb = NULL;
     write_cb = NULL;
@@ -406,6 +409,7 @@ struct FD {
     bytes = 0;
     doc = 0.0;
     doc_length = 0;
+    binary = 0;
     ims = 0;
     drop_after_CL = ::drop_after_CL;
     client_abort = 0;
@@ -413,6 +417,7 @@ struct FD {
     ftp_mode = FTP_NULL;
     ftp_peer_addr = 0;
     ftp_peer_port = 0;
+    ink_zero(name);
   }
 
   void close();
@@ -2571,7 +2576,6 @@ void interval_report() {
     }
 
 struct UrlHashTable {
-
   unsigned int    numbytes;
   unsigned char * bytes;
   int fd;
@@ -2635,7 +2639,9 @@ struct UrlHashTable {
 };
 UrlHashTable * uniq_urls = NULL;
 
-UrlHashTable::UrlHashTable() {
+UrlHashTable::UrlHashTable()
+  : numbytes(0), bytes(NULL), fd(-1)
+{
   off_t len = 0;
 
   if (!url_hash_entries)


Mime
View raw message