Module: sip-router
Branch: master
Commit: 6d0f635b0bbf338fca0ddc2c7d8e79bc686e5040
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6d0f635…
Author: Andrew Mortensen <admorten(a)isc.upenn.edu>
Committer: Andrew Mortensen <admorten(a)isc.upenn.edu>
Date: Wed Dec 5 14:00:12 2012 -0500
sca: modify SCA_STR_EMPTY macro to fix -Waddress compiler warnings.
- Reported by Ovidiu Sas
---
modules/sca/sca_common.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/sca/sca_common.h b/modules/sca/sca_common.h
index d613773..c4c806f 100644
--- a/modules/sca/sca_common.h
+++ b/modules/sca/sca_common.h
@@ -93,7 +93,8 @@
memcmp((str1)->s, (str2)->s, (str1)->len) == 0)
#define SCA_STR_EMPTY( str1 ) \
- ((str1) == NULL || (str1)->s == NULL || (str1)->len <= 0 )
+ (((str1) != NULL && ((str1)->s == NULL || (str1)->len <= 0 )) \
+ || (str1) == NULL )
#define SCA_HEADER_EMPTY( hdr1 ) \
((hdr1) == NULL || SCA_STR_EMPTY( &(hdr1)->body ))