trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject trafficserver git commit: Fixing clang static analysis warning
Date Sun, 16 Nov 2014 19:15:06 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 5c79cb924 -> a98114ac3


Fixing clang static analysis warning


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

Branch: refs/heads/master
Commit: a98114ac39f0ab607eb12affb4dacde00a05c9a8
Parents: 5c79cb9
Author: Brian Geffon <briang@apache.org>
Authored: Sun Nov 16 11:14:53 2014 -0800
Committer: Brian Geffon <briang@apache.org>
Committed: Sun Nov 16 11:14:53 2014 -0800

----------------------------------------------------------------------
 proxy/http2/HTTP2.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a98114ac/proxy/http2/HTTP2.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index 590d082..4991dd2 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -774,9 +774,11 @@ REGRESSION_TEST(HPACK_Decode)(RegressionTest * t, int, int *pstatus)
       MIMEField* field = headers->field_find(expected_name, strlen(expected_name));
       box.check(field != NULL, "A MIMEField that has \"%s\" as name doesn't exist", expected_name);
 
-      int actual_value_len;
-      const char* actual_value = field->value_get(&actual_value_len);
-      box.check(strncmp(expected_value, actual_value, actual_value_len) == 0, "A MIMEField
that has \"%s\" as value doesn't exist", expected_value);
+      if (field) {
+        int actual_value_len;
+        const char* actual_value = field->value_get(&actual_value_len);
+        box.check(strncmp(expected_value, actual_value, actual_value_len) == 0, "A MIMEField
that has \"%s\" as value doesn't exist", expected_value);
+      }
     }
   }
 }


Mime
View raw message