[tor-commits] [tor/master] coverage: Exclude lines in pubsub_pub that can only be reached on bug

asn at torproject.org asn at torproject.org
Wed Mar 27 12:31:32 UTC 2019


commit 3552cd69bdeefb5d4fbbc905b24120573cc26f81
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Mar 13 15:56:58 2019 -0400

    coverage: Exclude lines in pubsub_pub that can only be reached on bug
---
 src/lib/pubsub/pubsub_publish.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/pubsub/pubsub_publish.c b/src/lib/pubsub/pubsub_publish.c
index 7b070f35c..454a335a7 100644
--- a/src/lib/pubsub/pubsub_publish.c
+++ b/src/lib/pubsub/pubsub_publish.c
@@ -49,8 +49,10 @@ pubsub_pub_(const pub_binding_t *pub, msg_aux_data_t auxdata)
   if (BUG(pub->msg_template.msg >= d->n_msgs) ||
       BUG(pub->msg_template.channel >= d->n_queues)) {
     /* The message ID or channel ID was out of bounds. */
+    // LCOV_EXCL_START
     d->typefns[pub->msg_template.type].free_fn(auxdata);
     return -1;
+    // LCOV_EXCL_STOP
   }
 
   if (! d->table[pub->msg_template.msg]) {





More information about the tor-commits mailing list