[asterisk-commits] rizzo: trunk r48857 - /trunk/apps/app_sms.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Dec 22 03:35:22 MST 2006
Author: rizzo
Date: Fri Dec 22 04:35:20 2006
New Revision: 48857
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48857
Log:
improve readability of a few macros.
Modified:
trunk/apps/app_sms.c
Modified: trunk/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sms.c?view=diff&rev=48857&r1=48856&r2=48857
==============================================================================
--- trunk/apps/app_sms.c (original)
+++ trunk/apps/app_sms.c Fri Dec 22 04:35:20 2006
@@ -258,9 +258,9 @@
} sms_t;
/* different types of encoding */
-#define is7bit(dcs) (((dcs)&0xC0)?(!((dcs)&4)):(!((dcs)&12)))
-#define is8bit(dcs) (((dcs)&0xC0)?(((dcs)&4)):(((dcs)&12)==4))
-#define is16bit(dcs) (((dcs)&0xC0)?0:(((dcs)&12)==8))
+#define is7bit(dcs) ( ((dcs) & 0xC0) ? (!((dcs)&4) ) : (((dcs) & 0xc) == 0) )
+#define is8bit(dcs) ( ((dcs) & 0xC0) ? ( ((dcs)&4) ) : (((dcs) & 0xc) == 4) )
+#define is16bit(dcs) ( ((dcs) & 0xC0) ? 0 : (((dcs) & 0xc) == 8) )
static void sms_messagetx (sms_t * h);
More information about the asterisk-commits
mailing list