Browse Source

coverage: Exclude lines in pubsub_pub that can only be reached on bug

Nick Mathewson 5 years ago
parent
commit
3552cd69bd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/pubsub/pubsub_publish.c

+ 2 - 0
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) ||
   if (BUG(pub->msg_template.msg >= d->n_msgs) ||
       BUG(pub->msg_template.channel >= d->n_queues)) {
       BUG(pub->msg_template.channel >= d->n_queues)) {
     /* The message ID or channel ID was out of bounds. */
     /* The message ID or channel ID was out of bounds. */
+    // LCOV_EXCL_START
     d->typefns[pub->msg_template.type].free_fn(auxdata);
     d->typefns[pub->msg_template.type].free_fn(auxdata);
     return -1;
     return -1;
+    // LCOV_EXCL_STOP
   }
   }
 
 
   if (! d->table[pub->msg_template.msg]) {
   if (! d->table[pub->msg_template.msg]) {