diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-24 15:55:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-24 15:55:27 -0400 |
commit | 011d94fb11c0ccd8d009acba04304588f6d3694b (patch) | |
tree | 5d456af8e977db5a495bd887cc548ab5eb0e0ffb /src/test/test_protover.c | |
parent | 047790a25343e3857fb95e8874755440da30a982 (diff) | |
download | tor-011d94fb11c0ccd8d009acba04304588f6d3694b.tar.gz tor-011d94fb11c0ccd8d009acba04304588f6d3694b.zip |
apply ahf's test_assert_null.cocci
Diffstat (limited to 'src/test/test_protover.c')
-rw-r--r-- | src/test/test_protover.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/test_protover.c b/src/test/test_protover.c index 5626816024..6ce54890d6 100644 --- a/src/test/test_protover.c +++ b/src/test/test_protover.c @@ -88,27 +88,27 @@ test_protover_parse_fail(void *arg) /* random junk */ elts = parse_protocol_list("!!3@*"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); /* Missing equals sign in an entry */ elts = parse_protocol_list("Link=4 Haprauxymatyve Desc=9"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); /* Missing word. */ elts = parse_protocol_list("Link=4 =3 Desc=9"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); /* Broken numbers */ elts = parse_protocol_list("Link=fred"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); elts = parse_protocol_list("Link=1,fred"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); elts = parse_protocol_list("Link=1,fred,3"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); /* Broken range */ elts = parse_protocol_list("Link=1,9-8,3"); - tt_assert(elts == NULL); + tt_ptr_op(elts, OP_EQ, NULL); done: ; @@ -151,16 +151,16 @@ test_protover_all_supported(void *arg) char *msg = NULL; tt_assert(protover_all_supported(NULL, &msg)); - tt_assert(msg == NULL); + tt_ptr_op(msg, OP_EQ, NULL); tt_assert(protover_all_supported("", &msg)); - tt_assert(msg == NULL); + tt_ptr_op(msg, OP_EQ, NULL); // Some things that we do support tt_assert(protover_all_supported("Link=3-4", &msg)); - tt_assert(msg == NULL); + tt_ptr_op(msg, OP_EQ, NULL); tt_assert(protover_all_supported("Link=3-4 Desc=2", &msg)); - tt_assert(msg == NULL); + tt_ptr_op(msg, OP_EQ, NULL); // Some things we don't support tt_assert(! protover_all_supported("Wombat=9", &msg)); |