[PATCH 2/4] log: Add BUG_ON helper

Cyrill Gorcunov <[email protected]>
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
We will use it in sockets creating routine.

Signed-off-by: Cyrill Gorcunov <[email protected]>
---
 include/log.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/log.h b/include/log.h
index 500353d..22ad80a 100644
--- a/include/log.h
+++ b/include/log.h
@@ -59,4 +59,6 @@ void debugf(const char *fmt, ...);
 	}\
 }
 
+#define BUG_ON(condition)	do { if ((condition)) BUG(BUGTXT); } while (0)
+
 #endif	/* _LOG_H */
-- 
1.8.3.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.