Fixes for OONF_ASSERT() conversion
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Wed, 14 Mar 2018 14:00:54 +0000 (15:00 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Wed, 14 Mar 2018 14:00:54 +0000 (15:00 +0100)
src-api/core/oonf_logging.h
src-plugins/nhdp/nhdp/nhdp_writer.c

index 414e780..d308d13 100644 (file)
@@ -153,9 +153,9 @@ struct oonf_log_parameters {
 #endif
 
 #ifdef NDEBUG
-#define OONF_DO_ABORT true
-#else
 #define OONF_DO_ABORT false
+#else
+#define OONF_DO_ABORT true
 #endif
 
 /**
index 4b684bc..2ab2a4a 100644 (file)
@@ -255,7 +255,7 @@ _cb_addMessageTLVs(struct rfc5444_writer *writer) {
 
   target = oonf_rfc5444_get_target_from_writer(writer);
 
-  OONF_ASSERT(target != target->interface->multicast4 && target != target->interface->multicast6,
+  OONF_ASSERT(target == target->interface->multicast4 || target == target->interface->multicast6,
                 LOG_NHDP_W, "target for NHDP is no interface multicast: %s", netaddr_to_string(&buf, &target->dst));
 
   itime_encoded = rfc5497_timetlv_encode(_nhdp_if->refresh_interval);