You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by br...@apache.org on 2014/11/16 20:15:06 UTC
trafficserver git commit: Fixing clang static analysis warning
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 <br...@apache.org>
Authored: Sun Nov 16 11:14:53 2014 -0800
Committer: Brian Geffon <br...@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);
+ }
}
}
}