From 4f578cb98ac324c5497c1956f70fc4c4318a8e44 Mon Sep 17 00:00:00 2001
From: John Romein <romein@astron.nl>
Date: Mon, 25 Feb 2008 12:24:09 +0000
Subject: [PATCH] bug 225: fixed wrong use of c-style assert

---
 Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/ION_to_CN.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/ION_to_CN.h b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/ION_to_CN.h
index 5cec3b46587..1e22940320e 100644
--- a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/ION_to_CN.h
+++ b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/ION_to_CN.h
@@ -81,7 +81,9 @@ inline void ION_to_CN::read(TransportHolder *th)
 
 inline void ION_to_CN::write(TransportHolder *th)
 {
-  assert(itsFlags.marshall(&itsMarshalledData.flagsBuffer, sizeof itsMarshalledData.flagsBuffer) >= 0);
+  ssize_t size = itsFlags.marshall(&itsMarshalledData.flagsBuffer, sizeof itsMarshalledData.flagsBuffer);
+
+  assert(size >= 0);
   th->sendBlocking(&itsMarshalledData, sizeof itsMarshalledData, 1, 0);
 }
 
-- 
GitLab