You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2017/09/28 18:24:32 UTC
qpid-dispatch git commit: DISPATCH-837 - Remove unhelpful asset and
add a free to iterator. Fixes for coverity errors
Repository: qpid-dispatch
Updated Branches:
refs/heads/master 2f253d4c8 -> 34b202d1a
DISPATCH-837 - Remove unhelpful asset and add a free to iterator. Fixes for coverity errors
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/34b202d1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/34b202d1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/34b202d1
Branch: refs/heads/master
Commit: 34b202d1a2059bfa168ce1a245433e41884a579a
Parents: 2f253d4
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Thu Sep 28 14:24:17 2017 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Thu Sep 28 14:24:17 2017 -0400
----------------------------------------------------------------------
src/parse.c | 1 -
tests/message_test.c | 9 +++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/34b202d1/src/parse.c
----------------------------------------------------------------------
diff --git a/src/parse.c b/src/parse.c
index fc67f3d..c19455d 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -676,7 +676,6 @@ const char *qd_parse_annotations_v1(
assert(blob_pointer->remaining >= 0);
*blob_item_count = user_entries;
- assert(*blob_item_count >= 0);
return 0;
}
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/34b202d1/tests/message_test.c
----------------------------------------------------------------------
diff --git a/tests/message_test.c b/tests/message_test.c
index 0ef1d8b..90766f7 100644
--- a/tests/message_test.c
+++ b/tests/message_test.c
@@ -177,8 +177,13 @@ static char* test_message_properties(void *context)
set_content(content, size);
qd_iterator_t *iter = qd_message_field_iterator(msg, QD_FIELD_CORRELATION_ID);
- if (!iter) return "Expected iterator for the 'correlation-id' field";
- if (qd_iterator_length(iter) != 13) return "Bad length for correlation-id";
+ if (!iter) {
+ return "Expected iterator for the 'correlation-id' field";
+ }
+ if (qd_iterator_length(iter) != 13) {
+ qd_iterator_free(iter);
+ return "Bad length for correlation-id";
+ }
if (!qd_iterator_equal(iter, (const unsigned char *)"correlationId")) {
qd_iterator_free(iter);
return "Invalid correlation-id";
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org