turn if into assert
authorFlorian Dold <florian.dold@gmail.com>
Sun, 16 Oct 2016 22:15:51 +0000 (22:15 +0000)
committerFlorian Dold <florian.dold@gmail.com>
Sun, 16 Oct 2016 22:15:51 +0000 (22:15 +0000)
src/util/mq.c

index 0ada6e9b0cd048148552fbf777074757f48e686b..312fb3ff0164e7e3bb12d3695fe144824f6178f7 100644 (file)
@@ -612,10 +612,8 @@ GNUNET_MQ_set_handlers_closure (struct GNUNET_MQ_Handle *mq,
 const struct GNUNET_MessageHeader *
 GNUNET_MQ_impl_current (struct GNUNET_MQ_Handle *mq)
 {
-  if (NULL == mq->current_envelope)
-    GNUNET_assert (0);
-  if (NULL == mq->current_envelope->mh)
-    GNUNET_assert (0);
+  GNUNET_assert (NULL != mq->current_envelope);
+  GNUNET_assert (NULL == mq->current_envelope->mh);
   return mq->current_envelope->mh;
 }