summaryrefslogtreecommitdiff
path: root/lib/sdp.h
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2013-01-07 07:56:31 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-01-07 14:16:24 +0200
commit0305cfa11a06dea356f699a46da96f7146210466 (patch)
tree854d1164f75de3b852ac951dd9cfff04c1498978 /lib/sdp.h
parent31dc2ca5c4feee92c20f30622e0b9d38421215da (diff)
downloadbluez-0305cfa11a06dea356f699a46da96f7146210466.tar.gz
lib: Add SDP_IS_TEXT_STR() macro for SDP_TEXT_STR* checking
This new macro avoids constructs like "if (d->dtd < SDP_TEXT_STR8 || d->dtd > SDP_TEXT_STR32)" which are harder to read.
Diffstat (limited to 'lib/sdp.h')
-rw-r--r--lib/sdp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sdp.h b/lib/sdp.h
index 4448805e6..42681a27f 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 {