changeset 704:289632905e19

Added new sanity check
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 25 Jan 2011 16:34:27 +0900
parents b1d7d7cad733
children f0cb8f465763
files libfdproto/messages.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libfdproto/messages.c	Tue Jan 25 16:20:37 2011 +0900
+++ b/libfdproto/messages.c	Tue Jan 25 16:34:27 2011 +0900
@@ -134,7 +134,7 @@
 /* Macro to cast a msg_avp_t */
 #define _M(_x) ((struct msg *)(_x))
 /* Check the type and eyecatcher */
-#define CHECK_MSG(_x) ((_C(_x)->type == MSG_MSG) && (_M(_x)->msg_eyec == MSG_MSG_EYEC))
+#define CHECK_MSG(_x) ((_x) && (_C(_x)->type == MSG_MSG) && (_M(_x)->msg_eyec == MSG_MSG_EYEC))
 
 #define VALIDATE_OBJ(_x) ( (CHECK_MSG(_x)) || (CHECK_AVP(_x)) )
 
"Welcome to our mercurial repository"