This new macro avoids constructs like "if (d->dtd < SDP_TEXT_STR8 || d->dtd > SDP_TEXT_STR32)" which are harder to read. --- lib/sdp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sdp.h b/lib/sdp.h index 4448805..42681a2 100644 --- a/lib/sdp.h +++ b/lib/sdp.h @@ -440,6 +440,8 @@ typedef struct { #define SDP_IS_UUID(x) ((x) == SDP_UUID16 || (x) == SDP_UUID32 || (x) ==SDP_UUID128) #define SDP_IS_SEQ(x) ((x) == SDP_SEQ8 || (x) == SDP_SEQ16 || (x) == SDP_SEQ32) +#define SDP_IS_TEXT_STR(x) ((x) == SDP_TEXT_STR8 || (x) == SDP_TEXT_STR16 || \ + (x) == SDP_TEXT_STR32) typedef struct _sdp_list sdp_list_t; struct _sdp_list { -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html